This is an archive of the discontinued LLVM Phabricator instance.

Add ErrorOr<>::getOrDie() which uses report_fatal_error instead of assert.
AbandonedPublic

Authored by alexfh on Oct 9 2014, 10:30 AM.

Details

Reviewers
rafael
Summary

This method allows writing code that consistently fails in case of
dereferencing an ErrorOr<> containing no value rather than crashing in debug and
using uninitialized data in release build.

Diff Detail

Event Timeline

alexfh updated this revision to Diff 14662.Oct 9 2014, 10:30 AM
alexfh retitled this revision from to Add ErrorOr<>::getOrDie() which uses report_fatal_error instead of assert..
alexfh updated this object.
alexfh edited the test plan for this revision. (Show Details)
alexfh added a reviewer: rafael.
alexfh added a subscriber: Unknown Object (MLST).
rnk added a subscriber: rnk.Oct 9 2014, 11:29 AM

I don't think we should be burying invisible calls to report_fatal_error in
libraries. Can you point at the code which wants to do this?

alexfh abandoned this revision.Dec 22 2015, 8:58 AM