summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DIBuilder.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-19 23:13:14 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-19 23:13:14 +0000
commit2bc00f4a383549386c471db17cacb08cc9e53a0d (patch)
treec6f5472bea9573cc14b64f22d2fa4d2837df42b9 /llvm/lib/IR/DIBuilder.cpp
parent93e983e70796b047d4a798d23b536ba7ef111565 (diff)
downloadbcm5719-llvm-2bc00f4a383549386c471db17cacb08cc9e53a0d.tar.gz
bcm5719-llvm-2bc00f4a383549386c471db17cacb08cc9e53a0d.zip
IR: Merge UniquableMDNode back into MDNode, NFC
As pointed out in r226501, the distinction between `MDNode` and `UniquableMDNode` is confusing. When we need subclasses of `MDNode` that don't use all its functionality it might make sense to break it apart again, but until then this makes the code clearer. llvm-svn: 226520
Diffstat (limited to 'llvm/lib/IR/DIBuilder.cpp')
-rw-r--r--llvm/lib/IR/DIBuilder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index fdc0b1bb97b..eb686aa4bec 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -105,8 +105,8 @@ void DIBuilder::finalize() {
// Now that all temp nodes have been replaced or deleted, resolve remaining
// cycles.
for (const auto &N : UnresolvedNodes)
- if (N)
- cast<UniquableMDNode>(N)->resolveCycles();
+ if (N && !N->isResolved())
+ N->resolveCycles();
UnresolvedNodes.clear();
// Can't handle unresolved nodes anymore.
OpenPOWER on IntegriCloud