summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-12 20:09:34 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-12 20:09:34 +0000
commit118632dbf6851afc878098903a5baf7c8851d3c2 (patch)
tree2ac4f36d54bae0ee66fd8be3a0978b37840dfc8c /llvm/lib/AsmParser
parent30045e6148d7ad1a209160f1880a9d5a4d5ba26a (diff)
downloadbcm5719-llvm-118632dbf6851afc878098903a5baf7c8851d3c2.tar.gz
bcm5719-llvm-118632dbf6851afc878098903a5baf7c8851d3c2.zip
IR: Split GenericMDNode into MDTuple and UniquableMDNode
Split `GenericMDNode` into two classes (with more descriptive names). - `UniquableMDNode` will be a common subclass for `MDNode`s that are sometimes uniqued like constants, and sometimes 'distinct'. This class gets the (short-lived) RAUW support and related API. - `MDTuple` is the basic tuple that has always been returned by `MDNode::get()`. This is as opposed to more specific nodes to be added soon, which have additional fields, custom assembly syntax, and extra semantics. This class gets the hash-related logic, since other sublcasses of `UniquableMDNode` may need to hash based on other fields. To keep this diff from getting too big, I've added casts to `MDTuple` that won't really scale as new subclasses of `UniquableMDNode` are added, but I'll clean those up incrementally. (No functionality change intended.) llvm-svn: 225682
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index bcb314dfbd7..b33d6ad35c9 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -169,8 +169,8 @@ bool LLParser::ValidateEndOfModule() {
// Resolve metadata cycles.
for (auto &N : NumberedMetadata)
- if (auto *G = cast_or_null<GenericMDNode>(N))
- G->resolveCycles();
+ if (auto *U = cast_or_null<UniquableMDNode>(N))
+ U->resolveCycles();
// Look for intrinsic functions and CallInst that need to be upgraded
for (Module::iterator FI = M->begin(), FE = M->end(); FI != FE; )
OpenPOWER on IntegriCloud