This is an archive of the discontinued LLVM Phabricator instance.

[Polly] abort() on assertion violation.
ClosedPublic

Authored by Meinersbur on Apr 2 2018, 9:55 AM.

Details

Summary

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@codeaurora.org>

Diff Detail

Event Timeline

Meinersbur created this revision.Apr 2 2018, 9:55 AM

We might also think about using the standard assert() macro instead.

philip.pfaffe accepted this revision.Apr 3 2018, 2:10 AM
philip.pfaffe added a subscriber: philip.pfaffe.

We might also think about using the standard assert() macro instead.

+1, but this should be a follow-up change.

Other than that, LGTM.

This revision is now accepted and ready to land.Apr 3 2018, 2:10 AM
grosser accepted this revision.Apr 18 2018, 11:05 AM
This revision was automatically updated to reflect the committed changes.