Chromium Code Reviews| 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()); |