| Index: tools/pnacl-abicheck/pnacl-abicheck.cpp
|
| diff --git a/tools/pnacl-abicheck/pnacl-abicheck.cpp b/tools/pnacl-abicheck/pnacl-abicheck.cpp
|
| index e8fce66acdd9da3a491942070a560ffec36bd656..9b995fc6cd6ee35e0715041c3e8b319e2a0b12b3 100644
|
| --- a/tools/pnacl-abicheck/pnacl-abicheck.cpp
|
| +++ b/tools/pnacl-abicheck/pnacl-abicheck.cpp
|
| @@ -26,9 +26,14 @@ using namespace llvm;
|
| static cl::opt<std::string>
|
| InputFilename(cl::Positional, cl::desc("<input bitcode>"), cl::init("-"));
|
|
|
| -static cl::opt<bool, false>
|
| +static cl::opt<bool>
|
| Quiet("q", cl::desc("Do not print error messages"));
|
|
|
| +static cl::opt<bool>
|
| +AllowDebugMetadata("allow-debug-metadata",
|
| + cl::desc("Allow debug metadata."));
|
| +
|
| +
|
| // Print any errors collected by the error reporter. Return true if
|
| // there were any.
|
| static bool CheckABIVerifyErrors(PNaClABIErrorReporter &Reporter,
|
| @@ -59,11 +64,13 @@ int main(int argc, char **argv) {
|
| bool ErrorsFound = false;
|
| // Manually run the passes so we can tell the user which function had the
|
| // error. No need for a pass manager since it's just one pass.
|
| - OwningPtr<ModulePass> ModuleChecker(createPNaClABIVerifyModulePass(&ABIErrorReporter));
|
| + OwningPtr<ModulePass> ModuleChecker(
|
| + createPNaClABIVerifyModulePass(&ABIErrorReporter, AllowDebugMetadata));
|
| ModuleChecker->runOnModule(*Mod);
|
| ErrorsFound |= CheckABIVerifyErrors(ABIErrorReporter, "Module");
|
| OwningPtr<FunctionPass> FunctionChecker(
|
| - createPNaClABIVerifyFunctionsPass(&ABIErrorReporter));
|
| + createPNaClABIVerifyFunctionsPass(&ABIErrorReporter,
|
| + AllowDebugMetadata));
|
| for (Module::iterator MI = Mod->begin(), ME = Mod->end(); MI != ME; ++MI) {
|
| FunctionChecker->runOnFunction(*MI);
|
| ErrorsFound |= CheckABIVerifyErrors(ABIErrorReporter,
|
|
|