diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-03-01 21:00:32 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-03-01 21:00:32 +0000 |
commit | a0e0129e3f03fae1a275537a00e426a31d5eb649 (patch) | |
tree | 6d1b266217ac9c1f42ab71571de7f9bfec99b1f5 | |
parent | 7029725851520b3c5948a8b7bc0d2ae2aeda9430 (diff) | |
download | external_llvm-a0e0129e3f03fae1a275537a00e426a31d5eb649.zip external_llvm-a0e0129e3f03fae1a275537a00e426a31d5eb649.tar.gz external_llvm-a0e0129e3f03fae1a275537a00e426a31d5eb649.tar.bz2 |
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
-rw-r--r-- | lib/Transforms/IPO/ArgumentPromotion.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index 7036a01..e1fe118 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -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"); |