summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-22 19:17:48 +0000
committerChris Lattner <sabre@nondot.org>2010-01-22 19:17:48 +0000
commit8fa0e35f9775bc562eedf468fde63623b2da18bf (patch)
tree81f52fc4ac0d888d14e37371ffc1949ad80beaff /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parent6c0c8d41b4ada062842458bc627b72e87542f3fc (diff)
downloadbcm5719-llvm-8fa0e35f9775bc562eedf468fde63623b2da18bf.tar.gz
bcm5719-llvm-8fa0e35f9775bc562eedf468fde63623b2da18bf.zip
add a new MCAsmStreamer::GetCommentOS method to simplify stuff
that doesn't want to use twines. llvm-svn: 94199
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 5564fa16597..3f0a9def7fe 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1126,16 +1126,12 @@ static void EmitGlobalConstantStruct(const ConstantStruct *CS,
static void EmitGlobalConstantFP(const ConstantFP *CFP, unsigned AddrSpace,
AsmPrinter &AP) {
- SmallString<128> TmpBuffer;
-
// FP Constants are printed as integer constants to avoid losing
// precision.
if (CFP->getType()->isDoubleTy()) {
if (AP.VerboseAsm) {
- raw_svector_ostream OS(TmpBuffer);
- double Val = CFP->getValueAPF().convertToDouble(); // for comment only
- OS << "double " << Val;
- AP.OutStreamer.AddComment(OS.str());
+ double Val = CFP->getValueAPF().convertToDouble();
+ AP.OutStreamer.GetCommentOS() << "double " << Val << '\n';
}
uint64_t Val = CFP->getValueAPF().bitcastToAPInt().getZExtValue();
OpenPOWER on IntegriCloud