simplify code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30661 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-09-28 23:24:48 +00:00
parent 33ce777c4d
commit e354df963d

View File

@ -677,8 +677,7 @@ void CppWriter::printConstant(const Constant *CV) {
}
if (const ConstantBool *CB = dyn_cast<ConstantBool>(CV)) {
Out << "ConstantBool* " << constName << " = ConstantBool::get("
<< (CB == ConstantBool::True ? "true" : "false")
<< ");";
<< (CB->getValue() ? "true" : "false") << ");";
} else if (const ConstantSInt *CI = dyn_cast<ConstantSInt>(CV)) {
Out << "ConstantSInt* " << constName << " = ConstantSInt::get("
<< typeName << ", " << CI->getValue() << ");";