Page MenuHomePhabricator

Outline non returning functions unless a longjmp
Needs ReviewPublic

Authored by hiraditya on Mon, Oct 21, 6:38 AM.

Details

Reviewers
tejohnson
fhahn
Summary

__assert_fail, abort, exit etc. are cold.
TODO: outline throw

Diff Detail

Event Timeline

hiraditya created this revision.Mon, Oct 21, 6:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptMon, Oct 21, 6:38 AM

Will add test case soon.

fhahn added a comment.Mon, Oct 21, 9:36 AM

The longjmp intrinsic already should have the NoReturn property. Is the motivation here to handle calls of a function named longjmp, that is not the longjmp intrinsic? If that's the case, I do not think that is safe to do so. Unless it's the intrinsic, nothing ensures a function named longjmp actually corresponds to the library function.

fhahn added a comment.Mon, Oct 21, 9:45 AM

I wasn't reading that carefully enough, sorry! Still, please check for the longjmp intrinsic rather than just the name.

hiraditya updated this revision to Diff 225957.Mon, Oct 21, 2:33 PM
hiraditya updated this revision to Diff 225958.
hiraditya updated this revision to Diff 226325.Thu, Oct 24, 2:15 PM

Added testcase