From de03ff572138c56dab846f26d1a4bde1aa1f59d9 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Tue, 13 Jan 2015 20:44:56 +0000 Subject: IR: Add MDLocation class Add a new subclass of `UniquableMDNode`, `MDLocation`. This will be the IR version of `DebugLoc` and `DILocation`. The goal is to rename this to `DILocation` once the IR classes supersede the `DI`-prefixed wrappers. This isn't used anywhere yet. Part of PR21433. llvm-svn: 225824 --- llvm/lib/IR/LLVMContextImpl.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/IR/LLVMContextImpl.cpp') 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(); -- cgit v1.2.3