summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/LLVMContextImpl.h5
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;
+ }
}
};
OpenPOWER on IntegriCloud