aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-19 05:31:10 +0000
committerChris Lattner <sabre@nondot.org>2009-10-19 05:31:10 +0000
commit52e2031d4a5d76ff37458015a086285dfaceb6d2 (patch)
treeef05aea1b304e6ce7e8b0c17af14a7fa8b9d62c0
parent7723d45153c5610349486121e2b50b5ba60b2f5c (diff)
clean up after metadata changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84463 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/AsmParser/LLParser.cpp14
-rw-r--r--lib/AsmParser/LLToken.h1
2 files changed, 4 insertions, 11 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp
index d6cda3ccf0..0c1fce9f41 100644
--- a/lib/AsmParser/LLParser.cpp
+++ b/lib/AsmParser/LLParser.cpp
@@ -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;
diff --git a/lib/AsmParser/LLToken.h b/lib/AsmParser/LLToken.h
index b3c59ee9d3..7b12a53f52 100644
--- a/lib/AsmParser/LLToken.h
+++ b/lib/AsmParser/LLToken.h
@@ -64,7 +64,6 @@ namespace lltok {
kw_sideeffect,
kw_msasm,
kw_gc,
- kw_dbg,
kw_c,
kw_cc, kw_ccc, kw_fastcc, kw_coldcc,