diff options
author | Victor Hernandez <vhernandez@apple.com> | 2009-10-17 00:00:19 +0000 |
---|---|---|
committer | Victor Hernandez <vhernandez@apple.com> | 2009-10-17 00:00:19 +0000 |
commit | 13ad5aaaff8a446758b402fd5e9aea22f5bc5682 (patch) | |
tree | 02a18132aa0c90ad96e5aafeaea17439bb9cb5c2 /lib/AsmParser/LLLexer.cpp | |
parent | 8db42d2b1ce05e69b67f37c4e56a0f987a0c01d7 (diff) |
Autoupgrade malloc insts to malloc calls.
Update testcases that rely on malloc insts being present.
Also prematurely remove MallocInst handling from IndMemRemoval and RaiseAllocations to help pass tests in this incremental step.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84292 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/LLLexer.cpp')
-rw-r--r-- | lib/AsmParser/LLLexer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/AsmParser/LLLexer.cpp b/lib/AsmParser/LLLexer.cpp index 0e9f1a05fe..6d660111ac 100644 --- a/lib/AsmParser/LLLexer.cpp +++ b/lib/AsmParser/LLLexer.cpp @@ -602,6 +602,9 @@ lltok::Kind LLLexer::LexIdentifier() { // 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)) { + // Autoupgrade malloc instruction + return lltok::kw_malloc; } // Keywords for instructions. @@ -641,7 +644,6 @@ lltok::Kind LLLexer::LexIdentifier() { INSTKEYWORD(unwind, Unwind); INSTKEYWORD(unreachable, Unreachable); - INSTKEYWORD(malloc, Malloc); INSTKEYWORD(alloca, Alloca); INSTKEYWORD(free, Free); INSTKEYWORD(load, Load); |