diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-01-24 00:14:46 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-01-24 00:14:46 +0000 |
commit | 8b1f2f3b7007e1e086c0e20ad4fdea72222c4baf (patch) | |
tree | 634b8a792f2cef9d3c04111ad158049493722d75 /lib/IR | |
parent | 3467e30edf63b6d8a8d446186674ba9e4b7885a9 (diff) | |
download | external_llvm-8b1f2f3b7007e1e086c0e20ad4fdea72222c4baf.zip external_llvm-8b1f2f3b7007e1e086c0e20ad4fdea72222c4baf.tar.gz external_llvm-8b1f2f3b7007e1e086c0e20ad4fdea72222c4baf.tar.bz2 |
Cleanup the AttributeSetNodes that we create.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173311 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR')
-rw-r--r-- | lib/IR/LLVMContextImpl.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/IR/LLVMContextImpl.cpp b/lib/IR/LLVMContextImpl.cpp index 8fc9379..89e163f 100644 --- a/lib/IR/LLVMContextImpl.cpp +++ b/lib/IR/LLVMContextImpl.cpp @@ -109,6 +109,13 @@ LLVMContextImpl::~LLVMContextImpl() { 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; |