mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user