[polly] r330467 - [isl++] abort() on assertion violation.
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 20 11:59:13 PDT 2018
Author: meinersbur
Date: Fri Apr 20 11:59:13 2018
New Revision: 330467
URL: http://llvm.org/viewvc/llvm-project?rev=330467&view=rev
Log:
[isl++] abort() on assertion violation.
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>
Differential Revision: https://reviews.llvm.org/D45171
Modified:
polly/trunk/lib/External/isl/include/isl/isl-noexceptions.h
Modified: polly/trunk/lib/External/isl/include/isl/isl-noexceptions.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/include/isl/isl-noexceptions.h?rev=330467&r1=330466&r2=330467&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/include/isl/isl-noexceptions.h (original)
+++ polly/trunk/lib/External/isl/include/isl/isl-noexceptions.h Fri Apr 20 11:59:13 2018
@@ -38,6 +38,7 @@ inline namespace noexceptions {
fputs("Assertion \"" #test "\" failed at " __FILE__ \
":" ISLPP_STRINGIZE(__LINE__) "\n " message "\n", \
stderr); \
+ abort(); \
} while (0)
class boolean {
More information about the llvm-commits
mailing list