This is an archive of the discontinued LLVM Phabricator instance.

[lld] Use std::size instead of llvm::array_lengthof
ClosedPublic

Authored by jloser on Sep 9 2022, 11:44 AM.

Details

Summary

LLVM contains a helpful function for getting the size of a C-style
array: llvm::array_lengthof. This is useful prior to C++17, but not as
helpful for C++17 or later: std::size already has support for C-style
arrays.

Diff Detail

Event Timeline

jloser created this revision.Sep 9 2022, 11:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 9 2022, 11:44 AM
Herald added a subscriber: StephenFan. · View Herald Transcript
jloser requested review of this revision.Sep 9 2022, 11:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 9 2022, 11:44 AM
MaskRay accepted this revision.Sep 9 2022, 12:10 PM
This revision is now accepted and ready to land.Sep 9 2022, 12:10 PM
jloser updated this revision to Diff 459171.Sep 9 2022, 12:49 PM

clang-format

This revision was automatically updated to reflect the committed changes.