[PATCH] D51386: Add some context to fatal verifier errors
David Callahan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 28 15:07:47 PDT 2018
david2050 created this revision.
david2050 added a reviewer: mehdi_amini.
Herald added a subscriber: llvm-commits.
Add function name when verification fails as an initial breadcrumb for debugging.
Repository:
rL LLVM
https://reviews.llvm.org/D51386
Files:
lib/IR/Verifier.cpp
Index: lib/IR/Verifier.cpp
===================================================================
--- lib/IR/Verifier.cpp
+++ lib/IR/Verifier.cpp
@@ -4721,9 +4721,10 @@
}
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;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51386.162965.patch
Type: text/x-patch
Size: 465 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180828/a483863f/attachment.bin>
More information about the llvm-commits
mailing list