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

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: Fix issues in patch set 2. 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
« no previous file with comments | « tools/pnacl-abicheck/pnacl-abicheck.cpp ('k') | tools/pnacl-thaw/pnacl-thaw.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
}
« no previous file with comments | « tools/pnacl-abicheck/pnacl-abicheck.cpp ('k') | tools/pnacl-thaw/pnacl-thaw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698