[cfe-commits] r82857 - /cfe/trunk/lib/Frontend/Backend.cpp
Dan Gohman
gohman at apple.com
Sat Sep 26 08:06:14 PDT 2009
Author: djg
Date: Sat Sep 26 10:06:14 2009
New Revision: 82857
URL: http://llvm.org/viewvc/llvm-project?rev=82857&view=rev
Log:
Pass the formatted_raw_ostream to createPrintModulePass and
createBitcodeWriterPass instead of the underlying raw_ostream. This
avoids trouble with formatted_raw_ostream's behavior of setting the
underlying stream to be unbuffered, which resulted in
clang -emit-llvm -S using unbuffered output.
Modified:
cfe/trunk/lib/Frontend/Backend.cpp
Modified: cfe/trunk/lib/Frontend/Backend.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/Backend.cpp?rev=82857&r1=82856&r2=82857&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/Backend.cpp (original)
+++ cfe/trunk/lib/Frontend/Backend.cpp Sat Sep 26 10:06:14 2009
@@ -198,9 +198,9 @@
return true;
if (Action == Backend_EmitBC) {
- getPerModulePasses()->add(createBitcodeWriterPass(*AsmOutStream));
+ getPerModulePasses()->add(createBitcodeWriterPass(FormattedOutStream));
} else if (Action == Backend_EmitLL) {
- getPerModulePasses()->add(createPrintModulePass(AsmOutStream));
+ getPerModulePasses()->add(createPrintModulePass(&FormattedOutStream));
} else {
bool Fast = CompileOpts.OptimizationLevel == 0;
More information about the cfe-commits
mailing list