diff options
author | Chris Lattner <sabre@nondot.org> | 2007-08-23 05:15:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-08-23 05:15:32 +0000 |
commit | 9132a2b81842b0e2b77703fab3e6fe7467f859bb (patch) | |
tree | b31a8cddd0f652d3bc2e363a542dfc0b69067ea6 /lib | |
parent | c00c2baf481b9dffe9288f5dad0f5ec9687e1347 (diff) | |
download | external_llvm-9132a2b81842b0e2b77703fab3e6fe7467f859bb.zip external_llvm-9132a2b81842b0e2b77703fab3e6fe7467f859bb.tar.gz external_llvm-9132a2b81842b0e2b77703fab3e6fe7467f859bb.tar.bz2 |
rename APInt::toString -> toStringUnsigned for symmetry with toStringSigned()
Add an APSInt::toString() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41309 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ExecutionEngine/Interpreter/Execution.cpp | 5 | ||||
-rw-r--r-- | lib/Support/APInt.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/IPO/ArgumentPromotion.cpp | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp index 281f774..53df544 100644 --- a/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -1346,8 +1346,9 @@ static void PrintGenericValue(const GenericValue &Val, const Type* Ty) { case Type::DoubleTyID: DOUT << "double " << Val.DoubleVal; break; case Type::PointerTyID: DOUT << "void* " << intptr_t(Val.PointerVal); break; case Type::IntegerTyID: - DOUT << "i" << Val.IntVal.getBitWidth() << " " << Val.IntVal.toString(10) - << " (0x" << Val.IntVal.toString(16) << ")\n"; + DOUT << "i" << Val.IntVal.getBitWidth() << " " + << Val.IntVal.toStringUnsigned(10) + << " (0x" << Val.IntVal.toStringUnsigned(16) << ")\n"; break; } } diff --git a/lib/Support/APInt.cpp b/lib/Support/APInt.cpp index 173f28c..277a0b0 100644 --- a/lib/Support/APInt.cpp +++ b/lib/Support/APInt.cpp @@ -2008,8 +2008,8 @@ void APInt::dump() const else for (unsigned i = getNumWords(); i > 0; i--) { cerr << pVal[i-1] << " "; } - cerr << " U(" << this->toString(10) << ") S(" << this->toStringSigned(10) - << ")\n" << std::setbase(10); + cerr << " U(" << this->toStringUnsigned(10) << ") S(" + << this->toStringSigned(10) << ")\n" << std::setbase(10); } #endif diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index 78703a4..d40df48 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -519,7 +519,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 += "." + CI->getValue().toString(10); + NewName += "." + CI->getValue().toStringUnsigned(10); else NewName += ".x"; TheArg->setName(NewName+".val"); |