Unbreak cpp backend: upgrade output due to change in APInt API

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54942 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov 2008-08-18 20:03:45 +00:00
parent 133f10f9bd
commit 70053c340e

View File

@ -732,9 +732,10 @@ namespace {
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 << ");";