From 9e8d3bc46a588c293fb4387d94d7b285c7f68ca5 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Mon, 12 Jan 2015 21:23:11 +0000 Subject: [PATCH] AsmParser: ParseMDNode() => ParseMDTuple(), NFC This isn't parsing arbitrary subclasses of `MDNode`, just `MDTuple`. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225702 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AsmParser/LLParser.cpp | 8 ++++---- lib/AsmParser/LLParser.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index e5e6dc77da5..aac8022a246 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/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 &Elts) { return false; } -bool LLParser::ParseMDNode(MDNode *&MD, bool IsDistinct) { +bool LLParser::ParseMDTuple(MDNode *&MD, bool IsDistinct) { SmallVector 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/lib/AsmParser/LLParser.h b/lib/AsmParser/LLParser.h index 86b6c49e289..eb27ca4e719 100644 --- a/lib/AsmParser/LLParser.h +++ b/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 &MDs); bool ParseInstructionMetadata(Instruction *Inst, PerFunctionState *PFS); -- 2.34.1