clean up after metadata changes.
authorChris Lattner <sabre@nondot.org>
Mon, 19 Oct 2009 05:31:10 +0000 (05:31 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 19 Oct 2009 05:31:10 +0000 (05:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84463 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/LLParser.cpp
lib/AsmParser/LLToken.h

index d6cda3ccf042f1c150657766b48ec63737a9302e..0c1fce9f4140ca1e8d7895515bcedef0e9eb9d60 100644 (file)
@@ -1051,14 +1051,12 @@ bool LLParser::ParseOptionalCallingConv(CallingConv::ID &CC) {
 ///   ::= /* empty */
 ///   ::= !dbg !42
 bool LLParser::ParseOptionalCustomMetadata() {
-
-  std::string Name;
-  if (Lex.getKind() == lltok::NamedOrCustomMD) {
-    Name = Lex.getStrVal();
-    Lex.Lex();
-  } else
+  if (Lex.getKind() != lltok::NamedOrCustomMD)
     return false;
 
+  std::string Name = Lex.getStrVal();
+  Lex.Lex();
+
   if (Lex.getKind() != lltok::Metadata)
     return TokError("Expected '!' here");
   Lex.Lex();
@@ -2880,8 +2878,6 @@ bool LLParser::ParseRet(Instruction *&Inst, BasicBlock *BB,
   if (ParseType(Ty, true /*void allowed*/)) return true;
 
   if (Ty->isVoidTy()) {
-    if (EatIfPresent(lltok::comma))
-      if (ParseOptionalCustomMetadata()) return true;
     Inst = ReturnInst::Create(Context);
     return false;
   }
@@ -2917,8 +2913,6 @@ bool LLParser::ParseRet(Instruction *&Inst, BasicBlock *BB,
       }
     }
   }
-  if (EatIfPresent(lltok::comma))
-    if (ParseOptionalCustomMetadata()) return true;
 
   Inst = ReturnInst::Create(Context, RV);
   return false;
index b3c59ee9d3604a7c38e8f71c93f54e1dd39a70b5..7b12a53f52741aa8907b5998e8f3477f8391470e 100644 (file)
@@ -64,7 +64,6 @@ namespace lltok {
     kw_sideeffect,
     kw_msasm,
     kw_gc,
-    kw_dbg,
     kw_c,
 
     kw_cc, kw_ccc, kw_fastcc, kw_coldcc,