aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-11-07 19:49:17 +0000
committerDan Gohman <gohman@apple.com>2008-11-07 19:49:17 +0000
commiteb94abd06c83b66823049ca0a4ca43a981f81fc6 (patch)
treea0ca46346f74d34686ec6d1223b0a86b992726da /lib/Target/PowerPC
parente07c44ae031c85ba413eafecce1db7f67bb07228 (diff)
downloadexternal_llvm-eb94abd06c83b66823049ca0a4ca43a981f81fc6.zip
external_llvm-eb94abd06c83b66823049ca0a4ca43a981f81fc6.tar.gz
external_llvm-eb94abd06c83b66823049ca0a4ca43a981f81fc6.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58859 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC')
-rw-r--r--lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
index d164066..6c17dbe 100644
--- a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
+++ b/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;
}