diff options
author | Devang Patel <dpatel@apple.com> | 2010-02-11 19:35:10 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-02-11 19:35:10 +0000 |
commit | 11dbf8ee694ba02843814c42bc4dc278f6935dd5 (patch) | |
tree | 4ec00de89fa4d74ce1053560bcd0a9b1178aded6 /lib | |
parent | b917c47c98614a0bfbc3e79e378da6b15c18bef3 (diff) | |
download | external_llvm-11dbf8ee694ba02843814c42bc4dc278f6935dd5.zip external_llvm-11dbf8ee694ba02843814c42bc4dc278f6935dd5.tar.gz external_llvm-11dbf8ee694ba02843814c42bc4dc278f6935dd5.tar.bz2 |
Destroy MDNodes while destructing llvm context.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95903 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VMCore/LLVMContextImpl.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/VMCore/LLVMContextImpl.h b/lib/VMCore/LLVMContextImpl.h index f7f4860..4eb0722 100644 --- a/lib/VMCore/LLVMContextImpl.h +++ b/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) { |