diff options
| author | Devang Patel <dpatel@apple.com> | 2009-09-09 17:07:07 +0000 |
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2009-09-09 17:07:07 +0000 |
| commit | 93056ec4e253206a4716dfba8547f38f4e6bbb70 (patch) | |
| tree | f4d126fc0b0c08d844823dfe74e312014804fadd | |
| parent | 97840a396bcc77ed2f9c83328a7ee7111699a841 (diff) | |
| download | bcm5719-llvm-93056ec4e253206a4716dfba8547f38f4e6bbb70.tar.gz bcm5719-llvm-93056ec4e253206a4716dfba8547f38f4e6bbb70.zip | |
Gracefully destroy MDNodes.
llvm-svn: 81353
| -rw-r--r-- | llvm/lib/VMCore/LLVMContextImpl.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/LLVMContextImpl.h b/llvm/lib/VMCore/LLVMContextImpl.h index 77130d1ab94..048018d6b4d 100644 --- a/llvm/lib/VMCore/LLVMContextImpl.h +++ b/llvm/lib/VMCore/LLVMContextImpl.h @@ -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()) |

