[PATCH] D45171: [Polly] abort() on assertion violation.
Michael Kruse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 2 09:55:18 PDT 2018
Meinersbur created this revision.
Meinersbur added reviewers: grosser, eli.friedman.
Meinersbur added a project: Polly.
Herald added a reviewer: bollu.
Before this patch, ISL_ASSERT only printed an error message to stderr. This can be easily missed if the program continues or just fails later. To fail-early and help error diagnostics (e.g. using bugpoint), call abort() when an assertion does not hold.
I seem to just have forgotten to add this abort() when I originally proposed the ISL_ASSERT macro.
Suggested-By: Eli Friedman <efriedma at codeaurora.org>
Repository:
rPLO Polly
https://reviews.llvm.org/D45171
Files:
lib/External/isl/include/isl/isl-noexceptions.h
Index: lib/External/isl/include/isl/isl-noexceptions.h
===================================================================
--- lib/External/isl/include/isl/isl-noexceptions.h
+++ lib/External/isl/include/isl/isl-noexceptions.h
@@ -38,6 +38,7 @@
fputs("Assertion \"" #test "\" failed at " __FILE__ \
":" ISLPP_STRINGIZE(__LINE__) "\n " message "\n", \
stderr); \
+ abort(); \
} while (0)
class boolean {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45171.140639.patch
Type: text/x-patch
Size: 535 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180402/a469b123/attachment.bin>
More information about the llvm-commits
mailing list