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:
Reid Spencer 2007-03-01 21:00:32 +00:00
parent 7029725851
commit a0e0129e3f

View File

@ -515,7 +515,7 @@ Function *ArgPromotion::DoPromotion(Function *F,
std::string NewName = I->getName();
for (unsigned i = 0, e = Operands.size(); i != e; ++i)
if (ConstantInt *CI = dyn_cast<ConstantInt>(Operands[i]))
NewName += "."+itostr((int64_t)CI->getZExtValue());
NewName += "." + CI->getValue().toString(10);
else
NewName += ".x";
TheArg->setName(NewName+".val");