This is an archive of the discontinued LLVM Phabricator instance.

[MC] Leverage constexpr `std::array` in `SubtargetFeature.h`
ClosedPublic

Authored by jloser on Aug 12 2022, 9:18 PM.

Details

Summary

Replace C-style array with std::array since std::array<T, N>::operator[] is
constexpr in C++17. This also allows us to replace array_lengthof calls with
member size() function.

Diff Detail

Event Timeline

jloser created this revision.Aug 12 2022, 9:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2022, 9:18 PM
Herald added a subscriber: StephenFan. · View Herald Transcript
jloser requested review of this revision.Aug 12 2022, 9:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2022, 9:18 PM
This revision is now accepted and ready to land.Aug 12 2022, 9:22 PM
jloser updated this revision to Diff 452373.Aug 12 2022, 9:29 PM

Fix typo in constructor member initialization list

jloser updated this revision to Diff 452436.Aug 13 2022, 10:16 AM

Rebase to see if CI failure was a flake. It looks to be unrelated.