mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-18 17:55:18 +00:00
Make the generated code for ConstantInt nicer.
llvm-svn: 35902
This commit is contained in:
parent
9b497be3c4
commit
a9cb0e6602
@ -694,8 +694,8 @@ void CppWriter::printConstant(const Constant *CV) {
|
||||
return;
|
||||
}
|
||||
if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
|
||||
Out << "ConstantInt* " << constName << " = ConstantInt::get("
|
||||
<< "APInt(cast<IntegerType>(" << typeName << ")->getBitWidth(),"
|
||||
Out << "ConstantInt* " << constName << " = ConstantInt::get(APInt("
|
||||
<< cast<IntegerType>(CI->getType())->getBitWidth() << ", "
|
||||
<< " \"" << CI->getValue().toStringSigned(10) << "\", 10));";
|
||||
} else if (isa<ConstantAggregateZero>(CV)) {
|
||||
Out << "ConstantAggregateZero* " << constName
|
||||
|
Loading…
x
Reference in New Issue
Block a user