aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-09-28 22:50:29 +0000
committerChris Lattner <sabre@nondot.org>2006-09-28 22:50:29 +0000
commit9fb471df2ee4a35fd94ebf8156f76a83eacfffbb (patch)
treedd827ede311caefd8cab9268f885510cbdad8387
parentd9ae84898ef7e2e97aa4eecd8a9df8e383d15c67 (diff)
simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30655 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/AsmWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index 6b8f14971a..6b08266c31 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -421,7 +421,7 @@ static void WriteConstantInt(std::ostream &Out, const Constant *CV,
const int IndentSize = 4;
static std::string Indent = "\n";
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)) {
Out << CI->getValue();
} else if (const ConstantUInt *CI = dyn_cast<ConstantUInt>(CV)) {