| Index: tools/pnacl-abicheck/pnacl-abicheck.cpp
|
| diff --git a/tools/pnacl-abicheck/pnacl-abicheck.cpp b/tools/pnacl-abicheck/pnacl-abicheck.cpp
|
| index d5c9a76c5a6562a55cd10ee30e2f3b1a3f27a192..6ec63ff8f8c0e112f388dfc8d670cdb5d80cf00e 100644
|
| --- a/tools/pnacl-abicheck/pnacl-abicheck.cpp
|
| +++ b/tools/pnacl-abicheck/pnacl-abicheck.cpp
|
| @@ -29,6 +29,12 @@ static cl::opt<std::string>
|
| InputFilename(cl::Positional, cl::desc("<input bitcode>"), cl::init("-"));
|
|
|
| static cl::opt<bool>
|
| +VerboseErrors(
|
| + "verbose-parse-errors",
|
| + cl::desc("Print out more descriptive PNaCl bitcode parse errors"),
|
| + cl::init(false));
|
| +
|
| +static cl::opt<bool>
|
| Quiet("q", cl::desc("Do not print error messages"));
|
|
|
| static cl::opt<NaClFileFormat>
|
| @@ -61,8 +67,12 @@ int main(int argc, char **argv) {
|
| SMDiagnostic Err;
|
| cl::ParseCommandLineOptions(argc, argv, "PNaCl Bitcode ABI checker\n");
|
|
|
| + if (Quiet)
|
| + VerboseErrors = false;
|
| +
|
| + raw_ostream *Verbose = VerboseErrors ? &errs() : nullptr;
|
| std::unique_ptr<Module> Mod(
|
| - NaClParseIRFile(InputFilename, InputFileFormat, Err, Context));
|
| + NaClParseIRFile(InputFilename, InputFileFormat, Err, Verbose, Context));
|
| if (Mod.get() == 0) {
|
| Err.print(argv[0], errs());
|
| return 1;
|
|
|