AsmParser: ParseMDNode() => ParseMDTuple(), NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 12 Jan 2015 21:23:11 +0000 (21:23 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 12 Jan 2015 21:23:11 +0000 (21:23 +0000)
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
lib/AsmParser/LLParser.h

index e5e6dc77da5c18bd83f3316b4aeb6acb8ef77427..aac8022a2466b33c4ba39cbbdecd2df79e422643 100644 (file)
@@ -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;
index 86b6c49e289191d2392edf6596594299e5e3cbe8..eb27ca4e719d73a168719a761d01102a6c2a19a9 100644 (file)
@@ -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);