From f15014ff549a8686671a599f7b49ce9963769eaf Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 26 Jan 2022 16:55:53 +0100 Subject: Revert "Rename llvm::array_lengthof into llvm::size to match std::size from C++17" This reverts commit ef8206320769ad31422a803a0d6de6077fd231d2. - It conflicts with the existing llvm::size in STLExtras, which will now never be called. - Calling it without llvm:: breaks C++17 compat --- 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 96e1fb1..42e2575 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 >= size(Table)) + if (RType >= array_lengthof(Table)) res = "Unknown"; else res = Table[RType]; -- cgit v1.1