summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-12 21:23:11 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-12 21:23:11 +0000
commit58ef9d142a4db1b8143133f00fc5486295059312 (patch)
tree9fa6ca33c9a26a77175473bdba7fb270775797c5 /llvm/lib
parentf867c17ab5cecca34d189ec9cf3f825212b7e69b (diff)
downloadbcm5719-llvm-58ef9d142a4db1b8143133f00fc5486295059312.tar.gz
bcm5719-llvm-58ef9d142a4db1b8143133f00fc5486295059312.zip
AsmParser: ParseMDNode() => ParseMDTuple(), NFC
This isn't parsing arbitrary subclasses of `MDNode`, just `MDTuple`. llvm-svn: 225702
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp8
-rw-r--r--llvm/lib/AsmParser/LLParser.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index e5e6dc77da5..aac8022a246 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -588,7 +588,7 @@ bool LLParser::ParseStandaloneMetadata() {
bool IsDistinct = EatIfPresent(lltok::kw_distinct);
if (ParseToken(lltok::exclaim, "Expected '!' here") ||
- ParseMDNode(Init, IsDistinct))
+ ParseMDTuple(Init, IsDistinct))
return true;
// See if this was forward referenced, if so, handle it.
@@ -1497,7 +1497,7 @@ bool LLParser::ParseInstructionMetadata(Instruction *Inst,
// are supported here.
if (Lex.getKind() == lltok::lbrace) {
MDNode *N;
- if (ParseMDNode(N))
+ if (ParseMDTuple(N))
return true;
Inst->setMetadata(MDK, N);
} else {
@@ -2903,7 +2903,7 @@ bool LLParser::ParseGlobalValueVector(SmallVectorImpl<Constant *> &Elts) {
return false;
}
-bool LLParser::ParseMDNode(MDNode *&MD, bool IsDistinct) {
+bool LLParser::ParseMDTuple(MDNode *&MD, bool IsDistinct) {
SmallVector<Metadata *, 16> Elts;
if (ParseMDNodeVector(Elts))
return true;
@@ -2973,7 +2973,7 @@ bool LLParser::ParseMetadata(Metadata *&MD, PerFunctionState *PFS) {
// !{ ... }
if (Lex.getKind() == lltok::lbrace) {
MDNode *N;
- if (ParseMDNode(N))
+ if (ParseMDTuple(N))
return true;
MD = N;
return false;
diff --git a/llvm/lib/AsmParser/LLParser.h b/llvm/lib/AsmParser/LLParser.h
index 86b6c49e289..eb27ca4e719 100644
--- a/llvm/lib/AsmParser/LLParser.h
+++ b/llvm/lib/AsmParser/LLParser.h
@@ -387,7 +387,7 @@ namespace llvm {
bool ParseMetadataAsValue(Value *&V, PerFunctionState &PFS);
bool ParseValueAsMetadata(Metadata *&MD, PerFunctionState *PFS);
bool ParseMetadata(Metadata *&MD, PerFunctionState *PFS);
- bool ParseMDNode(MDNode *&MD, bool IsDistinct = false);
+ bool ParseMDTuple(MDNode *&MD, bool IsDistinct = false);
bool ParseMDNodeVector(SmallVectorImpl<Metadata *> &MDs);
bool ParseInstructionMetadata(Instruction *Inst, PerFunctionState *PFS);
OpenPOWER on IntegriCloud