This is an archive of the discontinued LLVM Phabricator instance.

[Object/ELF] Ensure preconditions are satisfied.
AbandonedPublic

Authored by davide on Sep 18 2015, 10:15 AM.

Details

Reviewers
rafael
Summary

Also, clarify a comment while at it.

Diff Detail

Event Timeline

davide updated this revision to Diff 35101.Sep 18 2015, 10:15 AM
davide retitled this revision from to [Object/ELF] Ensure preconditions are satisfied..
davide updated this object.
davide added a reviewer: rafael.
davide set the repository for this revision to rL LLVM.
davide added a subscriber: llvm-commits.
rafael edited edge metadata.Sep 18 2015, 1:30 PM

The comment part is fine.

I am not sure how much more useful asserts are than segmentation faults. How about passing in const references? That way ubsan should be able to catch it as soon as an invalid reference is constructed (I think).

davide abandoned this revision.Sep 18 2015, 1:43 PM

r248032 fixes the comment, I would like to think about changing to const references a little bit more. Abandoning this for now.