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

Unified Diff: tools/llc/llc.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
Index: tools/llc/llc.cpp
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp
index 64bb6991d8d990e75028acacdcbd5ae1f092b46a..b30c89039cdf6e84d2ae947ca91c4609fb08b8d6 100644
--- a/tools/llc/llc.cpp
+++ b/tools/llc/llc.cpp
@@ -126,7 +126,11 @@ static cl::opt<bool>
PNaClABIVerifyFatalErrors("pnaclabi-verify-fatal-errors",
cl::desc("PNaCl ABI verification errors are fatal"),
cl::init(false));
-// @LOCALMOD-END
+static cl::opt<bool>
+PNaClABIAllowDebug("pnaclabi-verify-allow-debug",
+ cl::desc("Allow debug metadata during PNaCl ABI verification."),
+ cl::init(false));
+//// @LOCALMOD-END
Mark Seaborn 2013/04/25 18:04:32 "////" -> "//"
// Determine optimization level.
static cl::opt<char>
@@ -388,7 +392,8 @@ static int compileModule(char **argv, LLVMContext &Context) {
// @LOCALMOD-BEGIN
if (PNaClABIVerify) {
// Verify the module (but not the functions yet)
- ModulePass *VerifyPass = createPNaClABIVerifyModulePass(&ABIErrorReporter);
+ ModulePass *VerifyPass = createPNaClABIVerifyModulePass(
+ &ABIErrorReporter, PNaClABIAllowDebug);
VerifyPass->runOnModule(*mod);
CheckABIVerifyErrors(ABIErrorReporter, "Module");
}
@@ -522,7 +527,8 @@ static int compileModule(char **argv, LLVMContext &Context) {
// Add the ABI verifier pass before the analysis and code emission passes.
FunctionPass *FunctionVerifyPass = NULL;
if (PNaClABIVerify) {
- FunctionVerifyPass = createPNaClABIVerifyFunctionsPass(&ABIErrorReporter);
+ FunctionVerifyPass = createPNaClABIVerifyFunctionsPass(
+ &ABIErrorReporter, PNaClABIAllowDebug);
PM->add(FunctionVerifyPass);
}
// @LOCALMOD-END

Powered by Google App Engine
This is Rietveld 408576698