1
0
mirror of https://github.com/c64scene-ar/llvm-6502.git synced 2025-03-24 07:35:04 +00:00

Make the generated code for ConstantInt nicer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35902 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2007-04-11 13:02:56 +00:00
parent 2cd43e402a
commit 4d26a0619d

@ -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