summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXin Tong <trent.xin.tong@gmail.com>2018-09-11 18:06:03 +0000
committerXin Tong <trent.xin.tong@gmail.com>2018-09-11 18:06:03 +0000
commit2533f747d7ed7856fe58f9a02c0c51fdb48a41c6 (patch)
treecb132ebe9e8b33708c8779e493d0ecd448ad5949
parent8238580aae31a222133fa52d3d9f945b64a3e2ec (diff)
downloadbcm5719-llvm-2533f747d7ed7856fe58f9a02c0c51fdb48a41c6.tar.gz
bcm5719-llvm-2533f747d7ed7856fe58f9a02c0c51fdb48a41c6.zip
Add some context to fatal verifier errors
Summary: Add function name when verification fails as an initial breadcrumb for debugging. Patch by David Callahan. Reviewers: mehdi_amini, modocache Reviewed By: modocache Subscribers: llvm-commits, modocache Differential Revision: https://reviews.llvm.org/D51386 llvm-svn: 341974
-rw-r--r--llvm/lib/IR/Verifier.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index e92aeac395e..d4f5173d92f 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -4730,9 +4730,10 @@ struct VerifierLegacyPass : public FunctionPass {
}
bool runOnFunction(Function &F) override {
- if (!V->verify(F) && FatalErrors)
+ if (!V->verify(F) && FatalErrors) {
+ errs() << "in function " << F.getName() << '\n';
report_fatal_error("Broken function found, compilation aborted!");
-
+ }
return false;
}
OpenPOWER on IntegriCloud