This is an archive of the discontinued LLVM Phabricator instance.

[LLVM] Replace `cast_or_null` with `cast_if_present`, NFC.
AbandonedPublic

Authored by bzcheeseman on Aug 31 2022, 9:29 PM.

Details

Summary

cast_if_present is simply the new version of cast_or_null - indeed cast_or_null calls cast_if_present. The if_present suffix more closely represents the capabilities of the function now, as it can correctly handle optionals and things that are not "null".

Diff Detail

Event Timeline

bzcheeseman created this revision.Aug 31 2022, 9:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 31 2022, 9:29 PM
bzcheeseman requested review of this revision.Aug 31 2022, 9:29 PM
bzcheeseman edited the summary of this revision. (Show Details)Aug 31 2022, 9:30 PM
bzcheeseman added a reviewer: lattner.
bzcheeseman abandoned this revision.Oct 14 2022, 8:37 AM

No consensus, closing this.