summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLLexer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-11-18 18:43:24 +0000
committerChris Lattner <sabre@nondot.org>2007-11-18 18:43:24 +0000
commitb01e500f163f646b54d6f56115e9b1f6469f9229 (patch)
treea6516fd76e5b8e97c2b24b02d3b903a743ebde74 /llvm/lib/AsmParser/LLLexer.cpp
parentf527037485539ed2d4bfe8ce5df86d69b7f39ee3 (diff)
downloadbcm5719-llvm-b01e500f163f646b54d6f56115e9b1f6469f9229.tar.gz
bcm5719-llvm-b01e500f163f646b54d6f56115e9b1f6469f9229.zip
autoupgrade files that use callfoo as call foo.
llvm-svn: 44218
Diffstat (limited to 'llvm/lib/AsmParser/LLLexer.cpp')
-rw-r--r--llvm/lib/AsmParser/LLLexer.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/LLLexer.cpp b/llvm/lib/AsmParser/LLLexer.cpp
index 25b532fb7b6..27798be618e 100644
--- a/llvm/lib/AsmParser/LLLexer.cpp
+++ b/llvm/lib/AsmParser/LLLexer.cpp
@@ -617,12 +617,20 @@ int LLLexer::LexIdentifier() {
}
}
- // Finally, if this is "cc1234", return this as just "cc".
+ // If this is "cc1234", return this as just "cc".
if (TokStart[0] == 'c' && TokStart[1] == 'c') {
CurPtr = TokStart+2;
return CC_TOK;
}
+ // 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;
+ llvmAsmlval.OtherOpVal = Instruction::Call;
+ return CALL;
+ }
+
// Finally, if this isn't known, return just a single character.
CurPtr = TokStart+1;
return TokStart[0];
OpenPOWER on IntegriCloud