Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(372)

Unified Diff: tools/pnacl-llc/pnacl-llc.cpp

Issue 1310883003: Install notion of diagnostic handler into PNaCl bitcode readers. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Reformat and fix nits. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
}

Powered by Google App Engine
This is Rietveld 408576698