Gracefully destroy MDNodes.

llvm-svn: 81353
This commit is contained in:
Devang Patel 2009-09-09 17:07:07 +00:00
parent 97840a396b
commit 93056ec4e2
1 changed files with 3 additions and 0 deletions

View File

@ -203,6 +203,9 @@ public:
AggZeroConstants.freeConstants();
NullPtrConstants.freeConstants();
UndefValueConstants.freeConstants();
for (FoldingSet<MDNode>::iterator I=MDNodeSet.begin(),
E =MDNodeSet.end(); I != E; ++I)
I->dropAllReferences();
for (IntMapTy::iterator I=IntConstants.begin(), E=IntConstants.end();
I != E; ++I) {
if (I->second->use_empty())