mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 16:17:17 +00:00
Use APInt conversion to string so the result is correct regardless of the
bit width of the ConstantInt being converted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34810 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -515,7 +515,7 @@ Function *ArgPromotion::DoPromotion(Function *F,
|
|||||||
std::string NewName = I->getName();
|
std::string NewName = I->getName();
|
||||||
for (unsigned i = 0, e = Operands.size(); i != e; ++i)
|
for (unsigned i = 0, e = Operands.size(); i != e; ++i)
|
||||||
if (ConstantInt *CI = dyn_cast<ConstantInt>(Operands[i]))
|
if (ConstantInt *CI = dyn_cast<ConstantInt>(Operands[i]))
|
||||||
NewName += "."+itostr((int64_t)CI->getZExtValue());
|
NewName += "." + CI->getValue().toString(10);
|
||||||
else
|
else
|
||||||
NewName += ".x";
|
NewName += ".x";
|
||||||
TheArg->setName(NewName+".val");
|
TheArg->setName(NewName+".val");
|
||||||
|
Reference in New Issue
Block a user