Skip to content

Commit

Permalink
stop accepting begin/end around function bodies in the .ll parser, th…
Browse files Browse the repository at this point in the history
…is isn't pascal anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133244 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
lattner committed Jun 17, 2011
1 parent 7a1b9bd commit 6b7c89e
Show file tree
Hide file tree
Showing 27 changed files with 7 additions and 678 deletions.
1 change: 0 additions & 1 deletion lib/AsmParser/LLLexer.cpp
Expand Up @@ -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);
Expand Down
7 changes: 3 additions & 4 deletions lib/AsmParser/LLParser.cpp
Expand Up @@ -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 {.

Expand All @@ -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 }.
Expand Down
1 change: 0 additions & 1 deletion lib/AsmParser/LLToken.h
Expand Up @@ -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,
Expand Down
25 changes: 0 additions & 25 deletions test/Integer/BitArith.ll

This file was deleted.

24 changes: 0 additions & 24 deletions test/Integer/BitBit.ll

This file was deleted.

26 changes: 0 additions & 26 deletions test/Integer/BitCast.ll

This file was deleted.

43 changes: 0 additions & 43 deletions test/Integer/BitIcmp.ll

This file was deleted.

24 changes: 0 additions & 24 deletions test/Integer/BitMisc.ll

This file was deleted.

56 changes: 0 additions & 56 deletions test/Integer/cfgstructures_bt.ll

This file was deleted.

33 changes: 0 additions & 33 deletions test/Integer/forwardreftest_bt.ll

This file was deleted.

26 changes: 0 additions & 26 deletions test/Integer/globalvars_bt.ll

This file was deleted.

24 changes: 0 additions & 24 deletions test/Integer/indirectcall2_bt.ll

This file was deleted.

52 changes: 0 additions & 52 deletions test/Integer/indirectcall_bt.ll

This file was deleted.

13 changes: 0 additions & 13 deletions test/Integer/prototype_bt.ll

This file was deleted.

0 comments on commit 6b7c89e

Please sign in to comment.