aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@google.com>2010-03-04 23:24:19 +0000
committerJeffrey Yasskin <jyasskin@google.com>2010-03-04 23:24:19 +0000
commite5790a432a320c64440bf62adbcec378046eef6b (patch)
tree68000d44620334e41e18d18f2944041eeff3be43 /lib
parent267124cff299922b3d92c5f2878fa285df2f1505 (diff)
Stop leaking MDStrings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97763 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/LLVMContextImpl.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/VMCore/LLVMContextImpl.h b/lib/VMCore/LLVMContextImpl.h
index 85bbe4ac9b..9887f28821 100644
--- a/lib/VMCore/LLVMContextImpl.h
+++ b/lib/VMCore/LLVMContextImpl.h
@@ -246,6 +246,11 @@ public:
MDNode *N = &(*MDNodeSet.begin());
N->destroy();
}
+ // Destroy MDStrings.
+ for (StringMap<MDString*>::iterator I = MDStringCache.begin(),
+ E = MDStringCache.end(); I != E; ++I) {
+ delete I->second;
+ }
}
};