From cb0df597e0f7f43b14cbed1f9dd1f39b22fe08be Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 7 Nov 2008 19:49:17 +0000 Subject: 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. llvm-svn: 58859 --- llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp') diff --git a/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp index d164066a9aa..6c17dbece07 100644 --- a/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp @@ -619,6 +619,8 @@ bool PPCLinuxAsmPrinter::runOnMachineFunction(MachineFunction &MF) { // Emit post-function debug information. DW.EndFunction(&MF); + O.flush(); + // We didn't modify anything. return false; } -- cgit v1.2.3