[llvm-commits] [llvm] r54942 - /llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
Anton Korobeynikov
asl at math.spbu.ru
Mon Aug 18 13:03:46 PDT 2008
Author: asl
Date: Mon Aug 18 15:03:45 2008
New Revision: 54942
URL: http://llvm.org/viewvc/llvm-project?rev=54942&view=rev
Log:
Unbreak cpp backend: upgrade output due to change in APInt API
Modified:
llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
Modified: llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp?rev=54942&r1=54941&r2=54942&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp (original)
+++ llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Mon Aug 18 15:03:45 2008
@@ -732,9 +732,10 @@
return;
}
if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
+ std::string constValue = CI->getValue().toString(10, true);
Out << "ConstantInt* " << constName << " = ConstantInt::get(APInt("
<< cast<IntegerType>(CI->getType())->getBitWidth() << ", \""
- << CI->getValue() << "\", 10));";
+ << constValue << "\", " << constValue.length() << ", 10));";
} else if (isa<ConstantAggregateZero>(CV)) {
Out << "ConstantAggregateZero* " << constName
<< " = ConstantAggregateZero::get(" << typeName << ");";
More information about the llvm-commits
mailing list