diff options
Diffstat (limited to 'llvm/lib/IR/LLVMContextImpl.cpp')
-rw-r--r-- | llvm/lib/IR/LLVMContextImpl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/IR/LLVMContextImpl.cpp b/llvm/lib/IR/LLVMContextImpl.cpp index d47a0d332fb..1fa080b8133 100644 --- a/llvm/lib/IR/LLVMContextImpl.cpp +++ b/llvm/lib/IR/LLVMContextImpl.cpp @@ -140,11 +140,15 @@ LLVMContextImpl::~LLVMContextImpl() { I->dropAllReferences(); for (auto *I : MDTuples) I->dropAllReferences(); + for (auto *I : MDLocations) + I->dropAllReferences(); for (UniquableMDNode *I : DistinctMDNodes) I->deleteAsSubclass(); for (MDTuple *I : MDTuples) delete I; + for (MDLocation *I : MDLocations) + delete I; // Destroy MDStrings. MDStringCache.clear(); |