From ef8206320769ad31422a803a0d6de6077fd231d2 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Wed, 26 Jan 2022 10:11:12 -0500 Subject: Rename llvm::array_lengthof into llvm::size to match std::size from C++17 As a conquence move llvm::array_lengthof from STLExtras.h to STLForwardCompat.h (which is included by STLExtras.h so no build breakage expected). --- llvm/lib/Object/MachOObjectFile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Object/MachOObjectFile.cpp') diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp index 42e2575..96e1fb1 100644 --- a/llvm/lib/Object/MachOObjectFile.cpp +++ b/llvm/lib/Object/MachOObjectFile.cpp @@ -2288,7 +2288,7 @@ void MachOObjectFile::getRelocationTypeName( "ARM64_RELOC_ADDEND" }; - if (RType >= array_lengthof(Table)) + if (RType >= size(Table)) res = "Unknown"; else res = Table[RType]; -- cgit v1.1