forked from OSchip/llvm-project
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. llvm-svn: 82857
This commit is contained in:
parent
bb6ac47ea1
commit
0b3cfab288
|
@ -198,9 +198,9 @@ bool BackendConsumer::AddEmitPasses(std::string &Error) {
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (Action == Backend_EmitBC) {
|
if (Action == Backend_EmitBC) {
|
||||||
getPerModulePasses()->add(createBitcodeWriterPass(*AsmOutStream));
|
getPerModulePasses()->add(createBitcodeWriterPass(FormattedOutStream));
|
||||||
} else if (Action == Backend_EmitLL) {
|
} else if (Action == Backend_EmitLL) {
|
||||||
getPerModulePasses()->add(createPrintModulePass(AsmOutStream));
|
getPerModulePasses()->add(createPrintModulePass(&FormattedOutStream));
|
||||||
} else {
|
} else {
|
||||||
bool Fast = CompileOpts.OptimizationLevel == 0;
|
bool Fast = CompileOpts.OptimizationLevel == 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue