[llvm] r341974 - Add some context to fatal verifier errors
Xin Tong via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 11 11:06:03 PDT 2018
Author: trentxintong
Date: Tue Sep 11 11:06:03 2018
New Revision: 341974
URL: http://llvm.org/viewvc/llvm-project?rev=341974&view=rev
Log:
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
Modified:
llvm/trunk/lib/IR/Verifier.cpp
Modified: llvm/trunk/lib/IR/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=341974&r1=341973&r2=341974&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Verifier.cpp (original)
+++ llvm/trunk/lib/IR/Verifier.cpp Tue Sep 11 11:06:03 2018
@@ -4730,9 +4730,10 @@ struct VerifierLegacyPass : public Funct
}
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;
}
More information about the llvm-commits
mailing list