summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-02-11 19:35:10 +0000
committerDevang Patel <dpatel@apple.com>2010-02-11 19:35:10 +0000
commit11ddc679ca09eff744cea781426210c5e09b1d17 (patch)
tree1aa37bc59d9cdd741a65eacf673239c9decf8d05 /llvm/lib
parente140686d9f7fae3705d6a541d22363c07a81dd0b (diff)
downloadbcm5719-llvm-11ddc679ca09eff744cea781426210c5e09b1d17.tar.gz
bcm5719-llvm-11ddc679ca09eff744cea781426210c5e09b1d17.zip
Destroy MDNodes while destructing llvm context.
llvm-svn: 95903
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/LLVMContextImpl.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/LLVMContextImpl.h b/llvm/lib/VMCore/LLVMContextImpl.h
index f7f4860614a..4eb07224045 100644
--- a/llvm/lib/VMCore/LLVMContextImpl.h
+++ b/llvm/lib/VMCore/LLVMContextImpl.h
@@ -224,7 +224,10 @@ public:
if (I->second->use_empty())
delete I->second;
}
- MDNodeSet.clear();
+ while (!MDNodeSet.empty()) {
+ MDNode *N = &(*MDNodeSet.begin());
+ N->destroy();
+ }
AlwaysOpaqueTy->dropRef();
for (OpaqueTypesTy::iterator I = OpaqueTypes.begin(), E = OpaqueTypes.end();
I != E; ++I) {
OpenPOWER on IntegriCloud