mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-27 13:30:05 +00:00
simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30661 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
33ce777c4d
commit
e354df963d
@ -677,8 +677,7 @@ void CppWriter::printConstant(const Constant *CV) {
|
|||||||
}
|
}
|
||||||
if (const ConstantBool *CB = dyn_cast<ConstantBool>(CV)) {
|
if (const ConstantBool *CB = dyn_cast<ConstantBool>(CV)) {
|
||||||
Out << "ConstantBool* " << constName << " = ConstantBool::get("
|
Out << "ConstantBool* " << constName << " = ConstantBool::get("
|
||||||
<< (CB == ConstantBool::True ? "true" : "false")
|
<< (CB->getValue() ? "true" : "false") << ");";
|
||||||
<< ");";
|
|
||||||
} else if (const ConstantSInt *CI = dyn_cast<ConstantSInt>(CV)) {
|
} else if (const ConstantSInt *CI = dyn_cast<ConstantSInt>(CV)) {
|
||||||
Out << "ConstantSInt* " << constName << " = ConstantSInt::get("
|
Out << "ConstantSInt* " << constName << " = ConstantSInt::get("
|
||||||
<< typeName << ", " << CI->getValue() << ");";
|
<< typeName << ", " << CI->getValue() << ");";
|
||||||
|
Loading…
Reference in New Issue
Block a user