Destroy MDNodes while destructing llvm context.

llvm-svn: 95903
This commit is contained in:
Devang Patel 2010-02-11 19:35:10 +00:00
parent e140686d9f
commit 11ddc679ca
1 changed files with 4 additions and 1 deletions

View File

@ -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) {