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

Unified Diff: src/llvm2ice.cpp

Issue 775173002: Fix PNaCl bitcode to LLVM IR reader to match new API. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/llvm2ice.cpp
diff --git a/src/llvm2ice.cpp b/src/llvm2ice.cpp
index a28b07f924c61a3b9dd45a17a72f30746014e27c..d92ee06fe1043a2cbd7b71c9f461a12ee814d26f 100644
--- a/src/llvm2ice.cpp
+++ b/src/llvm2ice.cpp
@@ -165,6 +165,14 @@ static cl::opt<bool>
cl::desc("Build ICE instructions when reading bitcode"),
cl::init(true));
+
+static cl::opt<bool>
+LLVMVerboseErrors(
+ "verbose-llvm-parse-errors",
+ cl::desc("Print out more descriptive PNaCl bitcode parse errors when "
+ "building LLVM IR first"),
+ cl::init(false));
Jim Stichnoth 2014/12/03 20:35:15 I realize the default false value is consistent wi
Karl 2014/12/03 20:57:29 I didn't worry about the verbose messages. Verbose
+
static cl::opt<bool>
UseIntegratedAssembler("integrated-as",
cl::desc("Use integrated assembler (default yes)"),
@@ -308,8 +316,10 @@ int main(int argc, char **argv) {
// Parse the input LLVM IR file into a module.
SMDiagnostic Err;
Ice::TimerMarker T1(Ice::TimerStack::TT_parse, &Ctx);
+ raw_ostream *Verbose = LLVMVerboseErrors ? &errs() : nullptr;
Module *Mod =
- NaClParseIRFile(IRFilename, InputFileFormat, Err, getGlobalContext());
+ NaClParseIRFile(IRFilename, InputFileFormat, Err, Verbose,
+ getGlobalContext());
if (!Mod) {
Err.print(argv[0], errs());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698