summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/LLVMContextImpl.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-24 00:14:46 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-24 00:14:46 +0000
commit164a4fbb5b99aadf060d9c96d74e5d60d369ee04 (patch)
tree9ee1f2626672ec5bff7a6c0e0e0b9b894b99cda2 /llvm/lib/IR/LLVMContextImpl.cpp
parentd2e493bb6596619d47476820a0864e933a7c53b0 (diff)
downloadbcm5719-llvm-164a4fbb5b99aadf060d9c96d74e5d60d369ee04.tar.gz
bcm5719-llvm-164a4fbb5b99aadf060d9c96d74e5d60d369ee04.zip
Cleanup the AttributeSetNodes that we create.
llvm-svn: 173311
Diffstat (limited to 'llvm/lib/IR/LLVMContextImpl.cpp')
-rw-r--r--llvm/lib/IR/LLVMContextImpl.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/IR/LLVMContextImpl.cpp b/llvm/lib/IR/LLVMContextImpl.cpp
index 8fc9379e5bf..89e163f5141 100644
--- a/llvm/lib/IR/LLVMContextImpl.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud