[llvm-commits] [llvm] r173311 - /llvm/trunk/lib/IR/LLVMContextImpl.cpp

Bill Wendling isanbard at gmail.com
Wed Jan 23 16:14:46 PST 2013


Author: void
Date: Wed Jan 23 18:14:46 2013
New Revision: 173311

URL: http://llvm.org/viewvc/llvm-project?rev=173311&view=rev
Log:
Cleanup the AttributeSetNodes that we create.

Modified:
    llvm/trunk/lib/IR/LLVMContextImpl.cpp

Modified: llvm/trunk/lib/IR/LLVMContextImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/LLVMContextImpl.cpp?rev=173311&r1=173310&r2=173311&view=diff
==============================================================================
--- llvm/trunk/lib/IR/LLVMContextImpl.cpp (original)
+++ llvm/trunk/lib/IR/LLVMContextImpl.cpp Wed Jan 23 18:14:46 2013
@@ -109,6 +109,13 @@
     delete &*Elem;
   }
 
+  // Destroy attribute node lists.
+  for (FoldingSetIterator<AttributeSetNode> I = AttrsSetNodes.begin(),
+         E = AttrsSetNodes.end(); I != E; ) {
+    FoldingSetIterator<AttributeSetNode> Elem = I++;
+    delete &*Elem;
+  }
+
   // Destroy MDNodes.  ~MDNode can move and remove nodes between the MDNodeSet
   // and the NonUniquedMDNodes sets, so copy the values out first.
   SmallVector<MDNode*, 8> MDNodes;





More information about the llvm-commits mailing list