aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/LLVMContextImpl.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-12 20:56:33 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-12 20:56:33 +0000
commitbf68e80d0650c816f0ba8ed1a1f90c0f43701996 (patch)
treedff4dd11f37cf7c7fac036699af37851149bcea4 /llvm/lib/IR/LLVMContextImpl.cpp
parent6b1f4659f98d3471dd8e821b5e60ca9abdb78421 (diff)
downloadllvm-bf68e80d0650c816f0ba8ed1a1f90c0f43701996.zip
llvm-bf68e80d0650c816f0ba8ed1a1f90c0f43701996.tar.gz
llvm-bf68e80d0650c816f0ba8ed1a1f90c0f43701996.tar.bz2
IR: Prepare for a new UniquableMDNode subclass, NFC
Add generic dispatch for the parts of `UniquableMDNode` that cast to `MDTuple`. This makes adding other subclasses (like PR21433's `MDLocation`) easier. llvm-svn: 225697
Diffstat (limited to 'llvm/lib/IR/LLVMContextImpl.cpp')
-rw-r--r--llvm/lib/IR/LLVMContextImpl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/LLVMContextImpl.cpp b/llvm/lib/IR/LLVMContextImpl.cpp
index c78b760..d47a0d3 100644
--- a/llvm/lib/IR/LLVMContextImpl.cpp
+++ b/llvm/lib/IR/LLVMContextImpl.cpp
@@ -142,7 +142,7 @@ LLVMContextImpl::~LLVMContextImpl() {
I->dropAllReferences();
for (UniquableMDNode *I : DistinctMDNodes)
- delete cast<MDTuple>(I);
+ I->deleteAsSubclass();
for (MDTuple *I : MDTuples)
delete I;