diff options
Diffstat (limited to 'llvm/lib/VMCore/LLVMContextImpl.h')
-rw-r--r-- | llvm/lib/VMCore/LLVMContextImpl.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/VMCore/LLVMContextImpl.h b/llvm/lib/VMCore/LLVMContextImpl.h index 58e8870d24e..84902d53559 100644 --- a/llvm/lib/VMCore/LLVMContextImpl.h +++ b/llvm/lib/VMCore/LLVMContextImpl.h @@ -203,9 +203,6 @@ 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()) @@ -216,6 +213,7 @@ public: if (I->second->use_empty()) delete I->second; } + MDNodeSet.clear(); } }; |