diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2010-03-04 23:24:19 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2010-03-04 23:24:19 +0000 |
commit | e5790a432a320c64440bf62adbcec378046eef6b (patch) | |
tree | 68000d44620334e41e18d18f2944041eeff3be43 /lib | |
parent | 267124cff299922b3d92c5f2878fa285df2f1505 (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.h | 5 |
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; + } } }; |