diff options
Diffstat (limited to 'lib/VMCore/AsmWriter.cpp')
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 09f6fee..138ab35 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -440,8 +440,9 @@ static void WriteConstantInt(std::ostream &Out, const Constant *CV, static std::string Indent = "\n"; if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) { if (CI->getType() == Type::Int1Ty) - Out << (CI->getBoolValue() ? "true" : "false"); - else Out << CI->getSExtValue(); + Out << (CI->getZExtValue() ? "true" : "false"); + else + Out << CI->getSExtValue(); } else if (const ConstantFP *CFP = dyn_cast<ConstantFP>(CV)) { // We would like to output the FP constant value in exponential notation, // but we cannot do this if doing so will lose precision. Check here to |