[llvm] r225702 - AsmParser: ParseMDNode() => ParseMDTuple(), NFC

Duncan P. N. Exon Smith dexonsmith at apple.com
Mon Jan 12 13:23:11 PST 2015


Author: dexonsmith
Date: Mon Jan 12 15:23:11 2015
New Revision: 225702

URL: http://llvm.org/viewvc/llvm-project?rev=225702&view=rev
Log:
AsmParser: ParseMDNode() => ParseMDTuple(), NFC

This isn't parsing arbitrary subclasses of `MDNode`, just `MDTuple`.

Modified:
    llvm/trunk/lib/AsmParser/LLParser.cpp
    llvm/trunk/lib/AsmParser/LLParser.h

Modified: llvm/trunk/lib/AsmParser/LLParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.cpp?rev=225702&r1=225701&r2=225702&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.cpp (original)
+++ llvm/trunk/lib/AsmParser/LLParser.cpp Mon Jan 12 15:23:11 2015
@@ -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(
     // 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(Sm
   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 *&
   // !{ ... }
   if (Lex.getKind() == lltok::lbrace) {
     MDNode *N;
-    if (ParseMDNode(N))
+    if (ParseMDTuple(N))
       return true;
     MD = N;
     return false;

Modified: llvm/trunk/lib/AsmParser/LLParser.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.h?rev=225702&r1=225701&r2=225702&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.h (original)
+++ llvm/trunk/lib/AsmParser/LLParser.h Mon Jan 12 15:23:11 2015
@@ -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);
 





More information about the llvm-commits mailing list