[llvm-commits] [llvm] r58859 - in /llvm/trunk/lib/Target: ARM/AsmPrinter/ARMAsmPrinter.cpp PowerPC/AsmPrinter/PPCAsmPrinter.cpp X86/AsmPrinter/X86ATTAsmPrinter.cpp X86/AsmPrinter/X86IntelAsmPrinter.cpp
Dan Gohman
gohman at apple.com
Fri Nov 7 11:49:18 PST 2008
Author: djg
Date: Fri Nov 7 13:49:17 2008
New Revision: 58859
URL: http://llvm.org/viewvc/llvm-project?rev=58859&view=rev
Log:
Flush the raw_ostream after emitting the assembly for a function.
This is a temporary fix for the -print-emitted-asm option, where
errs() is used as the stream, in the case where other code is
using stderr without using errs()' buffer. Hopefully soon we'll
fix errs() to be non-buffered instead. Patch by Preston Gurd.
Modified:
llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp
Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp?rev=58859&r1=58858&r2=58859&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Fri Nov 7 13:49:17 2008
@@ -263,6 +263,8 @@
// FIXME: Dwarf support.
//DW.EndFunction();
+ O.flush();
+
return false;
}
Modified: llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp?rev=58859&r1=58858&r2=58859&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp Fri Nov 7 13:49:17 2008
@@ -619,6 +619,8 @@
// Emit post-function debug information.
DW.EndFunction(&MF);
+ O.flush();
+
// We didn't modify anything.
return false;
}
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp?rev=58859&r1=58858&r2=58859&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp Fri Nov 7 13:49:17 2008
@@ -265,6 +265,8 @@
// Print out jump tables referenced by the function.
EmitJumpTableInfo(MF.getJumpTableInfo(), MF);
+ O.flush();
+
// We didn't modify anything.
return false;
}
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp?rev=58859&r1=58858&r2=58859&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp Fri Nov 7 13:49:17 2008
@@ -179,6 +179,8 @@
O << CurrentFnName << "\tendp\n";
+ O.flush();
+
// We didn't modify anything.
return false;
}
More information about the llvm-commits
mailing list