Chromium Code Reviews| Index: tools/pnacl-llc/pnacl-llc.cpp | 
| diff --git a/tools/pnacl-llc/pnacl-llc.cpp b/tools/pnacl-llc/pnacl-llc.cpp | 
| index 7d2024d44efe76e356d2f3af64d01a8a8386fe08..8f739b0837bc46e2923bf61391a809b16a99d461 100644 | 
| --- a/tools/pnacl-llc/pnacl-llc.cpp | 
| +++ b/tools/pnacl-llc/pnacl-llc.cpp | 
| @@ -367,8 +367,10 @@ static std::unique_ptr<Module> getModule( | 
| case PNaClFormat: { | 
| std::unique_ptr<StreamingMemoryObject> Cache( | 
| new ThreadedStreamingCache(StreamingObject)); | 
| - M.reset(getNaClStreamedBitcodeModule( | 
| - InputFilename, Cache.release(), Context, &VerboseStrm, &StrError)); | 
| + DiagnosticHandlerFunction DiagnosticHandler = nullptr; | 
| 
 
Derek Schuff
2015/08/24 22:46:04
can we not redirect error output in the streaming
 
Karl
2015/08/25 16:15:48
I admit, I just followed what LLVM did (below). Ja
 
 | 
| + M.reset(getNaClStreamedBitcodeModule(InputFilename, Cache.release(), | 
| + Context, DiagnosticHandler, | 
| + &StrError)); | 
| break; | 
| } | 
| case LLVMFormat: { | 
| @@ -394,8 +396,8 @@ static std::unique_ptr<Module> getModule( | 
| } else { | 
| // Parses binary bitcode as well as textual assembly | 
| // (so pulls in more code into pnacl-llc). | 
| - M = NaClParseIRFile(InputFilename, InputFileFormat, Err, &VerboseStrm, | 
| - Context); | 
| + M = NaClParseIRFile(InputFilename, InputFileFormat, Err, Context, | 
| + redirectNaClDiagnosticToStream(VerboseStrm)); | 
| } | 
| #endif | 
| } |