Commit ae35f196 by Karl Schimpf

Fix PNaCl bitcode to LLVM IR reader to match new API.

When LLVM 3.5 was merged, the handling of errors was broken. This is being fixed in the CL listed below. This CL fixes Subzero's call so that it will work with the CL listed below. Relavant LLVM CL: https://codereview.chromium.org/770853002 BUG= https://code.google.com/p/nativeclient/issues/detail?id=4006 R=jfb@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/775173002
parent 08c3bcd6
......@@ -166,6 +166,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));
static cl::opt<bool>
UseIntegratedAssembler("integrated-as",
cl::desc("Use integrated assembler (default yes)"),
......@@ -344,8 +352,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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment