summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/AsmWriter.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/AsmWriter.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/AsmWriter.cpp')
-rw-r--r--llvm/lib/IR/AsmWriter.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index e2ea36d7d2a..d9165437ec7 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -1311,16 +1311,15 @@ static void WriteMDNodeBodyInternal(raw_ostream &Out, const MDNode *Node,
const Module *Context) {
assert(!Node->isTemporary() && "Unexpected forward declaration");
- auto *Uniquable = cast<UniquableMDNode>(Node);
- if (Uniquable->isDistinct())
+ if (Node->isDistinct())
Out << "distinct ";
- switch (Uniquable->getMetadataID()) {
+ switch (Node->getMetadataID()) {
default:
llvm_unreachable("Expected uniquable MDNode");
-#define HANDLE_UNIQUABLE_LEAF(CLASS) \
+#define HANDLE_MDNODE_LEAF(CLASS) \
case Metadata::CLASS##Kind: \
- write##CLASS(Out, cast<CLASS>(Uniquable), TypePrinter, Machine, Context); \
+ write##CLASS(Out, cast<CLASS>(Node), TypePrinter, Machine, Context); \
break;
#include "llvm/IR/Metadata.def"
}
OpenPOWER on IntegriCloud