[cfe-commits] r141208 - /cfe/trunk/lib/AST/StmtPrinter.cpp
Eli Friedman
eli.friedman at gmail.com
Wed Oct 5 13:32:03 PDT 2011
Author: efriedma
Date: Wed Oct 5 15:32:03 2011
New Revision: 141208
URL: http://llvm.org/viewvc/llvm-project?rev=141208&view=rev
Log:
Use APFloat::toString to print APFloats more precisely in the AST printer. Patch by Olaf Krzikalla.
Modified:
cfe/trunk/lib/AST/StmtPrinter.cpp
Modified: cfe/trunk/lib/AST/StmtPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/StmtPrinter.cpp?rev=141208&r1=141207&r2=141208&view=diff
==============================================================================
--- cfe/trunk/lib/AST/StmtPrinter.cpp (original)
+++ cfe/trunk/lib/AST/StmtPrinter.cpp Wed Oct 5 15:32:03 2011
@@ -668,8 +668,9 @@
}
}
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) {
More information about the cfe-commits
mailing list