This is an archive of the discontinued LLVM Phabricator instance.

[NFC][AArch64] Use optional returns in target parser instead of 'invalid' objects
ClosedPublic

Authored by pratlucas on Jan 25 2023, 6:52 AM.

Details

Summary

This updates the parsing methods in AArch64's Target Parser to make use
of optional returns instead of "invalid" enum values, making the API's
behaviour clearer.

Diff Detail

Event Timeline

pratlucas created this revision.Jan 25 2023, 6:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 25 2023, 6:52 AM
pratlucas requested review of this revision.Jan 25 2023, 6:52 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 25 2023, 6:52 AM
lenary accepted this revision.Jan 25 2023, 9:54 AM
This revision is now accepted and ready to land.Jan 25 2023, 9:54 AM
tmatheson added inline comments.Jan 26 2023, 5:49 AM
llvm/unittests/TargetParser/TargetParserTest.cpp
1456

I think we still need to test getDefaultExtensions, unless we're deleting it.

pratlucas marked an inline comment as done.Jan 26 2023, 6:03 AM
pratlucas added inline comments.
llvm/unittests/TargetParser/TargetParserTest.cpp
1456

D142540 deletes it in favor of using the information in CpuInfo and ArchInfo.

tmatheson accepted this revision.Jan 26 2023, 6:58 AM
This revision was landed with ongoing or failed builds.Jan 27 2023, 4:36 AM
This revision was automatically updated to reflect the committed changes.
pratlucas marked an inline comment as done.