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

simplify code

llvm-svn: 30655
This commit is contained in:
Chris Lattner 2006-09-28 22:50:29 +00:00
parent 01dbd99342
commit 3b8cae29c7

View File

@ -421,7 +421,7 @@ static void WriteConstantInt(std::ostream &Out, const Constant *CV,
const int IndentSize = 4; const int IndentSize = 4;
static std::string Indent = "\n"; static std::string Indent = "\n";
if (const ConstantBool *CB = dyn_cast<ConstantBool>(CV)) { if (const ConstantBool *CB = dyn_cast<ConstantBool>(CV)) {
Out << (CB == ConstantBool::True ? "true" : "false"); Out << (CB->getValue() ? "true" : "false");
} else if (const ConstantSInt *CI = dyn_cast<ConstantSInt>(CV)) { } else if (const ConstantSInt *CI = dyn_cast<ConstantSInt>(CV)) {
Out << CI->getValue(); Out << CI->getValue();
} else if (const ConstantUInt *CI = dyn_cast<ConstantUInt>(CV)) { } else if (const ConstantUInt *CI = dyn_cast<ConstantUInt>(CV)) {