1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

clean up after metadata changes.

llvm-svn: 84463
This commit is contained in:
Chris Lattner 2009-10-19 05:31:10 +00:00
parent bb58da6d55
commit 5f094e66a8
2 changed files with 4 additions and 11 deletions

View 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;

View 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,