This is an archive of the discontinued LLVM Phabricator instance.

[flang][NFC] Small refactor for `IsProcedurePointer`
ClosedPublic

Authored by unterumarmung on Jun 16 2022, 7:41 AM.

Details

Summary

Instead of manually checking for procedure-like details in Symbol,
defer it to IsProcedure function.

Diff Detail

Event Timeline

unterumarmung created this revision.Jun 16 2022, 7:41 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 16 2022, 7:41 AM
unterumarmung requested review of this revision.Jun 16 2022, 7:41 AM

Is this change motivated by a test case for which the predicate is wrong, or does it just seem like a good idea?

unterumarmung added a comment.EditedJun 16 2022, 11:41 AM

I just thought it was a good idea, I tried it, ran the tests and they passed, so I submitted it to the review. I'm not sure that it is a correct change.
If there were a test case, I would've definitely added it to the test suite.

LGTM; thanks!

This is probably not an issue so feel free to ignore it. IsPointer is working on the symbol but IsProcedure internally gets the ultimate symbol, hence there is a difference in what each function is working on and also a difference from the existing implementation.

This revision was not accepted when it landed; it landed in state Needs Review.Jun 20 2022, 1:10 AM
This revision was automatically updated to reflect the committed changes.