Use APInt conversion to string so the result is correct regardless of the
[oota-llvm.git] / lib / Transforms / IPO / ArgumentPromotion.cpp
index 7036a01f0900ec883d92f6e68552d05d75970e78..e1fe118686e902f83a8f14d02588662fa3d3b1f5 100644 (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");