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 | bd8a759589c0e816e512dec5cbf6ac3131558091 (patch) | |
tree | 4c88f48fa055370c74254b017ec8e52be3643b43 /llvm/lib | |
parent | 97bb418575176d6a004299eaba69cc77dd71960f (diff) | |
download | bcm5719-llvm-bd8a759589c0e816e512dec5cbf6ac3131558091.tar.gz bcm5719-llvm-bd8a759589c0e816e512dec5cbf6ac3131558091.zip |
Stop leaking MDStrings.
llvm-svn: 97763
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/VMCore/LLVMContextImpl.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/LLVMContextImpl.h b/llvm/lib/VMCore/LLVMContextImpl.h index 85bbe4ac9b0..9887f28821c 100644 --- a/llvm/lib/VMCore/LLVMContextImpl.h +++ b/llvm/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; + } } }; |