1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

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

llvm-svn: 54942
This commit is contained in:
Anton Korobeynikov 2008-08-18 20:03:45 +00:00
parent c25fc6fc35
commit 2b4db92a29

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 << ");";