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..e3f3b7d8ce1bda42770a83939b990cb1003ca046 100644 |
--- a/tools/pnacl-llc/pnacl-llc.cpp |
+++ b/tools/pnacl-llc/pnacl-llc.cpp |
@@ -367,16 +367,18 @@ static std::unique_ptr<Module> getModule( |
case PNaClFormat: { |
std::unique_ptr<StreamingMemoryObject> Cache( |
new ThreadedStreamingCache(StreamingObject)); |
+ DiagnosticHandlerFunction DiagnosticHandler = nullptr; |
M.reset(getNaClStreamedBitcodeModule( |
- InputFilename, Cache.release(), Context, &VerboseStrm, &StrError)); |
+ InputFilename, Cache.release(), Context, |
+ redirectNaClDiagnosticToStream(VerboseStrm), &StrError)); |
break; |
} |
case LLVMFormat: { |
std::unique_ptr<StreamingMemoryObject> Cache( |
new ThreadedStreamingCache(StreamingObject)); |
ErrorOr<std::unique_ptr<Module>> MOrErr = |
- getStreamedBitcodeModule( |
- InputFilename, Cache.release(), Context); |
+ getStreamedBitcodeModule(InputFilename, Cache.release(), Context, |
+ redirectNaClDiagnosticToStream(VerboseStrm)); |
M = std::move(*MOrErr); |
break; |
} |
@@ -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 |
} |