simplify code
authorChris Lattner <sabre@nondot.org>
Thu, 28 Sep 2006 22:50:29 +0000 (22:50 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 28 Sep 2006 22:50:29 +0000 (22:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30655 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/AsmWriter.cpp

index 6b8f14971a0609fa114b1037fb7eab3288df75e0..6b08266c312331fca83fb8bc4712afc12619ff7f 100644 (file)
@@ -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)) {