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

Unified Diff: tools/pnacl-abicheck/pnacl-abicheck.cpp

Issue 14329025: Check for metadata in PNaCl ABI checker. (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: cleanup Created 7 years, 8 months 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
« tools/opt/opt.cpp ('K') | « tools/opt/opt.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« tools/opt/opt.cpp ('K') | « tools/opt/opt.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698