[llvm] 80d49ff - By-pass some ArrayRef deduction guide

via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 5 08:25:21 PST 2023


Author: serge-sans-paille
Date: 2023-01-05T17:23:41+01:00
New Revision: 80d49ffe4fa50de0085f81b9068f5f7c32e55758

URL: https://github.com/llvm/llvm-project/commit/80d49ffe4fa50de0085f81b9068f5f7c32e55758
DIFF: https://github.com/llvm/llvm-project/commit/80d49ffe4fa50de0085f81b9068f5f7c32e55758.diff

LOG: By-pass some ArrayRef deduction guide

clang-11 doesn't fully support them and requires an explicit
instantiation in some situation. This is fixed in (at least) clang-14

Added: 
    

Modified: 
    llvm/tools/llvm-readobj/ELFDumper.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp
index afd5b07274c64..102fc1a7e59b4 100644
--- a/llvm/tools/llvm-readobj/ELFDumper.cpp
+++ b/llvm/tools/llvm-readobj/ELFDumper.cpp
@@ -6499,7 +6499,8 @@ template <class ELFT> void LLVMELFDumper<ELFT>::printFileHeaders() {
     DictScope D(W, "ElfHeader");
     {
       DictScope D(W, "Ident");
-      W.printBinary("Magic", ArrayRef(E.e_ident).slice(ELF::EI_MAG0, 4));
+      W.printBinary("Magic",
+                    ArrayRef<unsigned char>(E.e_ident).slice(ELF::EI_MAG0, 4));
       W.printEnum("Class", E.e_ident[ELF::EI_CLASS], ArrayRef(ElfClass));
       W.printEnum("DataEncoding", E.e_ident[ELF::EI_DATA],
                   ArrayRef(ElfDataEncoding));
@@ -6522,7 +6523,8 @@ template <class ELFT> void LLVMELFDumper<ELFT>::printFileHeaders() {
       }
       W.printEnum("OS/ABI", E.e_ident[ELF::EI_OSABI], OSABI);
       W.printNumber("ABIVersion", E.e_ident[ELF::EI_ABIVERSION]);
-      W.printBinary("Unused", ArrayRef(E.e_ident).slice(ELF::EI_PAD));
+      W.printBinary("Unused",
+                    ArrayRef<unsigned char>(E.e_ident).slice(ELF::EI_PAD));
     }
 
     std::string TypeStr;


        


More information about the llvm-commits mailing list