summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLLexer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-06-17 03:16:47 +0000
committerChris Lattner <sabre@nondot.org>2011-06-17 03:16:47 +0000
commit78103725776262b4e9dd076ed4d02b4649556440 (patch)
tree52e3dacf95a0945fede12e6ccc04057ae250b400 /llvm/lib/AsmParser/LLLexer.cpp
parentb90ed2233c9fac46bac53de5833dd5e35db10acf (diff)
downloadbcm5719-llvm-78103725776262b4e9dd076ed4d02b4649556440.tar.gz
bcm5719-llvm-78103725776262b4e9dd076ed4d02b4649556440.zip
Remove old backwards compatibility support from the parser for autoupgrading
the old malloc/free instructions, and for 'sext' and 'zext' as function attributes (they are spelled signext/zeroext now), and support for result value attributes being specified after a function. Additionally, diagnose invalid attributes on functions with an error message instead of an abort in the verifier. llvm-svn: 133229
Diffstat (limited to 'llvm/lib/AsmParser/LLLexer.cpp')
-rw-r--r--llvm/lib/AsmParser/LLLexer.cpp39
1 files changed, 0 insertions, 39 deletions
diff --git a/llvm/lib/AsmParser/LLLexer.cpp b/llvm/lib/AsmParser/LLLexer.cpp
index a298c6af09a..85defca107b 100644
--- a/llvm/lib/AsmParser/LLLexer.cpp
+++ b/llvm/lib/AsmParser/LLLexer.cpp
@@ -406,17 +406,6 @@ lltok::Kind LLLexer::LexQuote() {
return kind;
}
-static bool JustWhitespaceNewLine(const char *&Ptr) {
- const char *ThisPtr = Ptr;
- while (*ThisPtr == ' ' || *ThisPtr == '\t')
- ++ThisPtr;
- if (*ThisPtr == '\n' || *ThisPtr == '\r') {
- Ptr = ThisPtr;
- return true;
- }
- return false;
-}
-
/// LexExclaim:
/// !foo
/// !
@@ -601,26 +590,6 @@ lltok::Kind LLLexer::LexIdentifier() {
TYPEKEYWORD("x86_mmx", Type::getX86_MMXTy(Context));
#undef TYPEKEYWORD
- // Handle special forms for autoupgrading. Drop these in LLVM 3.0. This is
- // to avoid conflicting with the sext/zext instructions, below.
- if (Len == 4 && !memcmp(StartChar, "sext", 4)) {
- // Scan CurPtr ahead, seeing if there is just whitespace before the newline.
- if (JustWhitespaceNewLine(CurPtr))
- return lltok::kw_signext;
- } else if (Len == 4 && !memcmp(StartChar, "zext", 4)) {
- // Scan CurPtr ahead, seeing if there is just whitespace before the newline.
- if (JustWhitespaceNewLine(CurPtr))
- return lltok::kw_zeroext;
- } else if (Len == 6 && !memcmp(StartChar, "malloc", 6)) {
- // FIXME: Remove in LLVM 3.0.
- // Autoupgrade malloc instruction.
- return lltok::kw_malloc;
- } else if (Len == 4 && !memcmp(StartChar, "free", 4)) {
- // FIXME: Remove in LLVM 3.0.
- // Autoupgrade malloc instruction.
- return lltok::kw_free;
- }
-
// Keywords for instructions.
#define INSTKEYWORD(STR, Enum) \
if (Len == strlen(#STR) && !memcmp(StartChar, #STR, strlen(#STR))) { \
@@ -692,14 +661,6 @@ lltok::Kind LLLexer::LexIdentifier() {
return lltok::kw_cc;
}
- // If this starts with "call", return it as CALL. This is to support old
- // broken .ll files. FIXME: remove this with LLVM 3.0.
- if (CurPtr-TokStart > 4 && !memcmp(TokStart, "call", 4)) {
- CurPtr = TokStart+4;
- UIntVal = Instruction::Call;
- return lltok::kw_call;
- }
-
// Finally, if this isn't known, return an error.
CurPtr = TokStart+1;
return lltok::Error;
OpenPOWER on IntegriCloud