mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Change inferred getCast into specific getCast. Passes all tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32469 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -215,8 +215,12 @@ void LowerInvoke::writeAbortMessage(Instruction *IB) {
|
||||
unsigned NumArgs = FT->getNumParams();
|
||||
for (unsigned i = 0; i != 3; ++i)
|
||||
if (i < NumArgs && FT->getParamType(i) != Args[i]->getType())
|
||||
Args[i] = ConstantExpr::getCast(cast<Constant>(Args[i]),
|
||||
FT->getParamType(i));
|
||||
if (Args[i]->getType()->isInteger())
|
||||
Args[i] = ConstantExpr::getIntegerCast(cast<Constant>(Args[i]),
|
||||
FT->getParamType(i), true);
|
||||
else
|
||||
Args[i] = ConstantExpr::getBitCast(cast<Constant>(Args[i]),
|
||||
FT->getParamType(i));
|
||||
|
||||
(new CallInst(WriteFn, Args, "", IB))->setTailCall();
|
||||
}
|
||||
|
Reference in New Issue
Block a user