This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by jloser on Sep 8 2022, 8:10 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.

Change call sites to use std::size instead.

Diff Detail

Event Timeline

jloser created this revision.Sep 8 2022, 8:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 8 2022, 8:10 AM
jloser requested review of this revision.Sep 8 2022, 8:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 8 2022, 8:10 AM
This revision is now accepted and ready to land.Sep 8 2022, 9:40 AM
This revision was automatically updated to reflect the committed changes.