summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 fbe5f07d8a..739c52129e 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -464,7 +464,7 @@ static void WriteConstantInt(std::ostream &Out, const Constant *CV,
if (CI->getType() == Type::Int1Ty)
Out << (CI->getZExtValue() ? "true" : "false");
else
- Out << CI->getSExtValue();
+ Out << CI->getValue().toString(10,/*wantSigned=*/true);
} 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