summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/LLVMContextImpl.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-13 20:44:56 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-13 20:44:56 +0000
commitde03ff572138c56dab846f26d1a4bde1aa1f59d9 (patch)
treed2f2837f400366db02f2563bd8444e0ebd2d64d6 /llvm/lib/IR/LLVMContextImpl.cpp
parentb56d8433483b9b5a99ef5f3b3540193561e54670 (diff)
downloadbcm5719-llvm-de03ff572138c56dab846f26d1a4bde1aa1f59d9.tar.gz
bcm5719-llvm-de03ff572138c56dab846f26d1a4bde1aa1f59d9.zip
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
Diffstat (limited to 'llvm/lib/IR/LLVMContextImpl.cpp')
-rw-r--r--llvm/lib/IR/LLVMContextImpl.cpp4
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();
OpenPOWER on IntegriCloud