aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/AST/StmtPrinter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/AST/StmtPrinter.cpp b/lib/AST/StmtPrinter.cpp
index 57a3e61e54..dfa2612152 100644
--- a/lib/AST/StmtPrinter.cpp
+++ b/lib/AST/StmtPrinter.cpp
@@ -668,8 +668,9 @@ void StmtPrinter::VisitIntegerLiteral(IntegerLiteral *Node) {
}
}
void StmtPrinter::VisitFloatingLiteral(FloatingLiteral *Node) {
- // FIXME: print value more precisely.
- OS << Node->getValueAsApproximateDouble();
+ llvm::SmallString<16> Str;
+ Node->getValue().toString(Str);
+ OS << Str;
}
void StmtPrinter::VisitImaginaryLiteral(ImaginaryLiteral *Node) {