diff options
author | Chris Lattner <sabre@nondot.org> | 2011-06-17 06:42:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-06-17 06:42:57 +0000 |
commit | 6b7c89ee096146aefebc245c7d8741b69786655a (patch) | |
tree | 899a24b59687a5be1ef36c70dfc8283b04dd4a22 /lib/AsmParser | |
parent | 7a1b9bdd2b837b15c9213cdaf89cacc977e4600e (diff) | |
download | external_llvm-6b7c89ee096146aefebc245c7d8741b69786655a.zip external_llvm-6b7c89ee096146aefebc245c7d8741b69786655a.tar.gz external_llvm-6b7c89ee096146aefebc245c7d8741b69786655a.tar.bz2 |
stop accepting begin/end around function bodies in the .ll parser, this isn't pascal anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133244 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r-- | lib/AsmParser/LLLexer.cpp | 1 | ||||
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 7 | ||||
-rw-r--r-- | lib/AsmParser/LLToken.h | 1 |
3 files changed, 3 insertions, 6 deletions
diff --git a/lib/AsmParser/LLLexer.cpp b/lib/AsmParser/LLLexer.cpp index 85defca..3350a45 100644 --- a/lib/AsmParser/LLLexer.cpp +++ b/lib/AsmParser/LLLexer.cpp @@ -471,7 +471,6 @@ lltok::Kind LLLexer::LexIdentifier() { if (Len == strlen(#STR) && !memcmp(StartChar, #STR, strlen(#STR))) \ return lltok::kw_##STR; - KEYWORD(begin); KEYWORD(end); KEYWORD(true); KEYWORD(false); KEYWORD(declare); KEYWORD(define); KEYWORD(global); KEYWORD(constant); diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index a3d77ae..f778193 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -2835,10 +2835,9 @@ bool LLParser::ParseFunctionHeader(Function *&Fn, bool isDefine) { /// ParseFunctionBody /// ::= '{' BasicBlock+ '}' -/// ::= 'begin' BasicBlock+ 'end' // FIXME: remove in LLVM 3.0 /// bool LLParser::ParseFunctionBody(Function &Fn) { - if (Lex.getKind() != lltok::lbrace && Lex.getKind() != lltok::kw_begin) + if (Lex.getKind() != lltok::lbrace) return TokError("expected '{' in function body"); Lex.Lex(); // eat the {. @@ -2848,10 +2847,10 @@ bool LLParser::ParseFunctionBody(Function &Fn) { PerFunctionState PFS(*this, Fn, FunctionNumber); // We need at least one basic block. - if (Lex.getKind() == lltok::rbrace || Lex.getKind() == lltok::kw_end) + if (Lex.getKind() == lltok::rbrace) return TokError("function body requires at least one basic block"); - while (Lex.getKind() != lltok::rbrace && Lex.getKind() != lltok::kw_end) + while (Lex.getKind() != lltok::rbrace) if (ParseBasicBlock(PFS)) return true; // Eat the }. diff --git a/lib/AsmParser/LLToken.h b/lib/AsmParser/LLToken.h index ea01264..cfa867b 100644 --- a/lib/AsmParser/LLToken.h +++ b/lib/AsmParser/LLToken.h @@ -32,7 +32,6 @@ namespace lltok { exclaim, // ! kw_x, - kw_begin, kw_end, kw_true, kw_false, kw_declare, kw_define, kw_global, kw_constant, |