[lldb] Use std::size instead of llvm::array_lengthof
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. Differential Revision: https://reviews.llvm.org/D133501
This commit is contained in:
@@ -743,7 +743,7 @@ bool ObjectFilePECOFF::ParseSectionHeaders(
|
||||
}
|
||||
|
||||
llvm::StringRef ObjectFilePECOFF::GetSectionName(const section_header_t §) {
|
||||
llvm::StringRef hdr_name(sect.name, llvm::array_lengthof(sect.name));
|
||||
llvm::StringRef hdr_name(sect.name, std::size(sect.name));
|
||||
hdr_name = hdr_name.split('\0').first;
|
||||
if (hdr_name.consume_front("/")) {
|
||||
lldb::offset_t stroff;
|
||||
|
||||
Reference in New Issue
Block a user