[llvm] r360676 - [llvm-readobj] - Apply clang format. NFC.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Tue May 14 07:22:44 PDT 2019


Author: grimar
Date: Tue May 14 07:22:44 2019
New Revision: 360676

URL: http://llvm.org/viewvc/llvm-project?rev=360676&view=rev
Log:
[llvm-readobj] - Apply clang format. NFC.

I am a bit tired of the formatting issues.

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

Modified: llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/ELFDumper.cpp?rev=360676&r1=360675&r2=360676&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/ELFDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/ELFDumper.cpp Tue May 14 07:22:44 2019
@@ -67,13 +67,14 @@ using namespace llvm;
 using namespace llvm::object;
 using namespace ELF;
 
-#define LLVM_READOBJ_ENUM_CASE(ns, enum) \
-  case ns::enum: return #enum;
+#define LLVM_READOBJ_ENUM_CASE(ns, enum)                                       \
+  case ns::enum:                                                               \
+    return #enum;
 
-#define ENUM_ENT(enum, altName) \
+#define ENUM_ENT(enum, altName)                                                \
   { #enum, altName, ELF::enum }
 
-#define ENUM_ENT_1(enum) \
+#define ENUM_ENT_1(enum)                                                       \
   { #enum, #enum, ELF::enum }
 
 #define LLVM_READOBJ_PHDR_ENUM(ns, enum)                                       \
@@ -99,7 +100,7 @@ using namespace ELF;
   using Elf_Word = typename ELFT::Word;                                        \
   using Elf_Hash = typename ELFT::Hash;                                        \
   using Elf_GnuHash = typename ELFT::GnuHash;                                  \
-  using Elf_Note  = typename ELFT::Note;                                       \
+  using Elf_Note = typename ELFT::Note;                                        \
   using Elf_Sym_Range = typename ELFT::SymRange;                               \
   using Elf_Versym = typename ELFT::Versym;                                    \
   using Elf_Verneed = typename ELFT::Verneed;                                  \
@@ -139,8 +140,7 @@ struct DynRegionInfo {
   }
 };
 
-template <typename ELFT>
-class ELFDumper : public ObjDumper {
+template <typename ELFT> class ELFDumper : public ObjDumper {
 public:
   ELFDumper(const object::ELFObjectFile<ELFT> *ObjF, ScopedPrinter &Writer);
 
@@ -194,11 +194,13 @@ private:
   }
 
   DynRegionInfo createDRIFrom(const Elf_Phdr *P, uintX_t EntSize) {
-    return checkDRI({ObjF->getELFFile()->base() + P->p_offset, P->p_filesz, EntSize});
+    return checkDRI(
+        {ObjF->getELFFile()->base() + P->p_offset, P->p_filesz, EntSize});
   }
 
   DynRegionInfo createDRIFrom(const Elf_Shdr *S) {
-    return checkDRI({ObjF->getELFFile()->base() + S->sh_offset, S->sh_size, S->sh_entsize});
+    return checkDRI(
+        {ObjF->getELFFile()->base() + S->sh_offset, S->sh_size, S->sh_entsize});
   }
 
   void parseDynamicTable(ArrayRef<const Elf_Phdr *> LoadSegments);
@@ -229,9 +231,9 @@ private:
   StringRef DynSymtabName;
   ArrayRef<Elf_Word> ShndxTable;
 
-  const Elf_Shdr *SymbolVersionSection = nullptr;   // .gnu.version
+  const Elf_Shdr *SymbolVersionSection = nullptr;     // .gnu.version
   const Elf_Shdr *SymbolVersionNeedSection = nullptr; // .gnu.version_r
-  const Elf_Shdr *SymbolVersionDefSection = nullptr; // .gnu.version_d
+  const Elf_Shdr *SymbolVersionDefSection = nullptr;  // .gnu.version_d
 
   // Records for each version index the corresponding Verdef or Vernaux entry.
   // This is filled the first time LoadVersionMap() is called.
@@ -650,8 +652,8 @@ StringRef ELFDumper<ELFT>::getSymbolVers
 
   // Determine the position in the symbol table of this entry.
   size_t EntryIndex = (reinterpret_cast<uintptr_t>(Sym) -
-                        reinterpret_cast<uintptr_t>(DynSymRegion.Addr)) /
-                       sizeof(Elf_Sym);
+                       reinterpret_cast<uintptr_t>(DynSymRegion.Addr)) /
+                      sizeof(Elf_Sym);
 
   // Get the corresponding version index entry.
   const Elf_Versym *Versym =
@@ -667,7 +669,8 @@ static std::string maybeDemangle(StringR
 template <typename ELFT>
 std::string ELFDumper<ELFT>::getStaticSymbolName(uint32_t Index) const {
   const ELFFile<ELFT> *Obj = ObjF->getELFFile();
-  StringRef StrTable = unwrapOrError(Obj->getStringTableForSymtab(*DotSymtabSec));
+  StringRef StrTable =
+      unwrapOrError(Obj->getStringTableForSymtab(*DotSymtabSec));
   Elf_Sym_Range Syms = unwrapOrError(Obj->symbols(DotSymtabSec));
   if (Index >= Syms.size())
     reportError("Invalid symbol index");
@@ -676,13 +679,13 @@ std::string ELFDumper<ELFT>::getStaticSy
 }
 
 template <typename ELFT>
-StringRef ELFDumper<ELFT>::getSymbolVersionByIndex(
-    StringRef StrTab, uint32_t SymbolVersionIndex, bool &IsDefault) const {
+StringRef ELFDumper<ELFT>::getSymbolVersionByIndex(StringRef StrTab,
+                                                   uint32_t SymbolVersionIndex,
+                                                   bool &IsDefault) const {
   size_t VersionIndex = SymbolVersionIndex & VERSYM_VERSION;
 
   // Special markers for unversioned symbols.
-  if (VersionIndex == VER_NDX_LOCAL ||
-      VersionIndex == VER_NDX_GLOBAL) {
+  if (VersionIndex == VER_NDX_LOCAL || VersionIndex == VER_NDX_GLOBAL) {
     IsDefault = false;
     return "";
   }
@@ -785,45 +788,44 @@ static const typename ELFO::Elf_Shdr *fi
 }
 
 static const EnumEntry<unsigned> ElfClass[] = {
-  {"None",   "none",   ELF::ELFCLASSNONE},
-  {"32-bit", "ELF32",  ELF::ELFCLASS32},
-  {"64-bit", "ELF64",  ELF::ELFCLASS64},
+    {"None", "none", ELF::ELFCLASSNONE},
+    {"32-bit", "ELF32", ELF::ELFCLASS32},
+    {"64-bit", "ELF64", ELF::ELFCLASS64},
 };
 
 static const EnumEntry<unsigned> ElfDataEncoding[] = {
-  {"None",         "none",                          ELF::ELFDATANONE},
-  {"LittleEndian", "2's complement, little endian", ELF::ELFDATA2LSB},
-  {"BigEndian",    "2's complement, big endian",    ELF::ELFDATA2MSB},
+    {"None", "none", ELF::ELFDATANONE},
+    {"LittleEndian", "2's complement, little endian", ELF::ELFDATA2LSB},
+    {"BigEndian", "2's complement, big endian", ELF::ELFDATA2MSB},
 };
 
 static const EnumEntry<unsigned> ElfObjectFileType[] = {
-  {"None",         "NONE (none)",              ELF::ET_NONE},
-  {"Relocatable",  "REL (Relocatable file)",   ELF::ET_REL},
-  {"Executable",   "EXEC (Executable file)",   ELF::ET_EXEC},
-  {"SharedObject", "DYN (Shared object file)", ELF::ET_DYN},
-  {"Core",         "CORE (Core file)",         ELF::ET_CORE},
+    {"None", "NONE (none)", ELF::ET_NONE},
+    {"Relocatable", "REL (Relocatable file)", ELF::ET_REL},
+    {"Executable", "EXEC (Executable file)", ELF::ET_EXEC},
+    {"SharedObject", "DYN (Shared object file)", ELF::ET_DYN},
+    {"Core", "CORE (Core file)", ELF::ET_CORE},
 };
 
 static const EnumEntry<unsigned> ElfOSABI[] = {
-  {"SystemV",      "UNIX - System V",      ELF::ELFOSABI_NONE},
-  {"HPUX",         "UNIX - HP-UX",         ELF::ELFOSABI_HPUX},
-  {"NetBSD",       "UNIX - NetBSD",        ELF::ELFOSABI_NETBSD},
-  {"GNU/Linux",    "UNIX - GNU",           ELF::ELFOSABI_LINUX},
-  {"GNU/Hurd",     "GNU/Hurd",             ELF::ELFOSABI_HURD},
-  {"Solaris",      "UNIX - Solaris",       ELF::ELFOSABI_SOLARIS},
-  {"AIX",          "UNIX - AIX",           ELF::ELFOSABI_AIX},
-  {"IRIX",         "UNIX - IRIX",          ELF::ELFOSABI_IRIX},
-  {"FreeBSD",      "UNIX - FreeBSD",       ELF::ELFOSABI_FREEBSD},
-  {"TRU64",        "UNIX - TRU64",         ELF::ELFOSABI_TRU64},
-  {"Modesto",      "Novell - Modesto",     ELF::ELFOSABI_MODESTO},
-  {"OpenBSD",      "UNIX - OpenBSD",       ELF::ELFOSABI_OPENBSD},
-  {"OpenVMS",      "VMS - OpenVMS",        ELF::ELFOSABI_OPENVMS},
-  {"NSK",          "HP - Non-Stop Kernel", ELF::ELFOSABI_NSK},
-  {"AROS",         "AROS",                 ELF::ELFOSABI_AROS},
-  {"FenixOS",      "FenixOS",              ELF::ELFOSABI_FENIXOS},
-  {"CloudABI",     "CloudABI",             ELF::ELFOSABI_CLOUDABI},
-  {"Standalone",   "Standalone App",       ELF::ELFOSABI_STANDALONE}
-};
+    {"SystemV", "UNIX - System V", ELF::ELFOSABI_NONE},
+    {"HPUX", "UNIX - HP-UX", ELF::ELFOSABI_HPUX},
+    {"NetBSD", "UNIX - NetBSD", ELF::ELFOSABI_NETBSD},
+    {"GNU/Linux", "UNIX - GNU", ELF::ELFOSABI_LINUX},
+    {"GNU/Hurd", "GNU/Hurd", ELF::ELFOSABI_HURD},
+    {"Solaris", "UNIX - Solaris", ELF::ELFOSABI_SOLARIS},
+    {"AIX", "UNIX - AIX", ELF::ELFOSABI_AIX},
+    {"IRIX", "UNIX - IRIX", ELF::ELFOSABI_IRIX},
+    {"FreeBSD", "UNIX - FreeBSD", ELF::ELFOSABI_FREEBSD},
+    {"TRU64", "UNIX - TRU64", ELF::ELFOSABI_TRU64},
+    {"Modesto", "Novell - Modesto", ELF::ELFOSABI_MODESTO},
+    {"OpenBSD", "UNIX - OpenBSD", ELF::ELFOSABI_OPENBSD},
+    {"OpenVMS", "VMS - OpenVMS", ELF::ELFOSABI_OPENVMS},
+    {"NSK", "HP - Non-Stop Kernel", ELF::ELFOSABI_NSK},
+    {"AROS", "AROS", ELF::ELFOSABI_AROS},
+    {"FenixOS", "FenixOS", ELF::ELFOSABI_FENIXOS},
+    {"CloudABI", "CloudABI", ELF::ELFOSABI_CLOUDABI},
+    {"Standalone", "Standalone App", ELF::ELFOSABI_STANDALONE}};
 
 static const EnumEntry<unsigned> SymVersionFlags[] = {
     {"Base", "BASE", VER_FLG_BASE},
@@ -831,197 +833,199 @@ static const EnumEntry<unsigned> SymVers
     {"Info", "INFO", VER_FLG_INFO}};
 
 static const EnumEntry<unsigned> AMDGPUElfOSABI[] = {
-  {"AMDGPU_HSA",    "AMDGPU - HSA",    ELF::ELFOSABI_AMDGPU_HSA},
-  {"AMDGPU_PAL",    "AMDGPU - PAL",    ELF::ELFOSABI_AMDGPU_PAL},
-  {"AMDGPU_MESA3D", "AMDGPU - MESA3D", ELF::ELFOSABI_AMDGPU_MESA3D}
-};
+    {"AMDGPU_HSA", "AMDGPU - HSA", ELF::ELFOSABI_AMDGPU_HSA},
+    {"AMDGPU_PAL", "AMDGPU - PAL", ELF::ELFOSABI_AMDGPU_PAL},
+    {"AMDGPU_MESA3D", "AMDGPU - MESA3D", ELF::ELFOSABI_AMDGPU_MESA3D}};
 
 static const EnumEntry<unsigned> ARMElfOSABI[] = {
-  {"ARM", "ARM", ELF::ELFOSABI_ARM}
-};
+    {"ARM", "ARM", ELF::ELFOSABI_ARM}};
 
 static const EnumEntry<unsigned> C6000ElfOSABI[] = {
-  {"C6000_ELFABI", "Bare-metal C6000", ELF::ELFOSABI_C6000_ELFABI},
-  {"C6000_LINUX",  "Linux C6000",      ELF::ELFOSABI_C6000_LINUX}
-};
+    {"C6000_ELFABI", "Bare-metal C6000", ELF::ELFOSABI_C6000_ELFABI},
+    {"C6000_LINUX", "Linux C6000", ELF::ELFOSABI_C6000_LINUX}};
 
 static const EnumEntry<unsigned> ElfMachineType[] = {
-  ENUM_ENT(EM_NONE,          "None"),
-  ENUM_ENT(EM_M32,           "WE32100"),
-  ENUM_ENT(EM_SPARC,         "Sparc"),
-  ENUM_ENT(EM_386,           "Intel 80386"),
-  ENUM_ENT(EM_68K,           "MC68000"),
-  ENUM_ENT(EM_88K,           "MC88000"),
-  ENUM_ENT(EM_IAMCU,         "EM_IAMCU"),
-  ENUM_ENT(EM_860,           "Intel 80860"),
-  ENUM_ENT(EM_MIPS,          "MIPS R3000"),
-  ENUM_ENT(EM_S370,          "IBM System/370"),
-  ENUM_ENT(EM_MIPS_RS3_LE,   "MIPS R3000 little-endian"),
-  ENUM_ENT(EM_PARISC,        "HPPA"),
-  ENUM_ENT(EM_VPP500,        "Fujitsu VPP500"),
-  ENUM_ENT(EM_SPARC32PLUS,   "Sparc v8+"),
-  ENUM_ENT(EM_960,           "Intel 80960"),
-  ENUM_ENT(EM_PPC,           "PowerPC"),
-  ENUM_ENT(EM_PPC64,         "PowerPC64"),
-  ENUM_ENT(EM_S390,          "IBM S/390"),
-  ENUM_ENT(EM_SPU,           "SPU"),
-  ENUM_ENT(EM_V800,          "NEC V800 series"),
-  ENUM_ENT(EM_FR20,          "Fujistsu FR20"),
-  ENUM_ENT(EM_RH32,          "TRW RH-32"),
-  ENUM_ENT(EM_RCE,           "Motorola RCE"),
-  ENUM_ENT(EM_ARM,           "ARM"),
-  ENUM_ENT(EM_ALPHA,         "EM_ALPHA"),
-  ENUM_ENT(EM_SH,            "Hitachi SH"),
-  ENUM_ENT(EM_SPARCV9,       "Sparc v9"),
-  ENUM_ENT(EM_TRICORE,       "Siemens Tricore"),
-  ENUM_ENT(EM_ARC,           "ARC"),
-  ENUM_ENT(EM_H8_300,        "Hitachi H8/300"),
-  ENUM_ENT(EM_H8_300H,       "Hitachi H8/300H"),
-  ENUM_ENT(EM_H8S,           "Hitachi H8S"),
-  ENUM_ENT(EM_H8_500,        "Hitachi H8/500"),
-  ENUM_ENT(EM_IA_64,         "Intel IA-64"),
-  ENUM_ENT(EM_MIPS_X,        "Stanford MIPS-X"),
-  ENUM_ENT(EM_COLDFIRE,      "Motorola Coldfire"),
-  ENUM_ENT(EM_68HC12,        "Motorola MC68HC12 Microcontroller"),
-  ENUM_ENT(EM_MMA,           "Fujitsu Multimedia Accelerator"),
-  ENUM_ENT(EM_PCP,           "Siemens PCP"),
-  ENUM_ENT(EM_NCPU,          "Sony nCPU embedded RISC processor"),
-  ENUM_ENT(EM_NDR1,          "Denso NDR1 microprocesspr"),
-  ENUM_ENT(EM_STARCORE,      "Motorola Star*Core processor"),
-  ENUM_ENT(EM_ME16,          "Toyota ME16 processor"),
-  ENUM_ENT(EM_ST100,         "STMicroelectronics ST100 processor"),
-  ENUM_ENT(EM_TINYJ,         "Advanced Logic Corp. TinyJ embedded processor"),
-  ENUM_ENT(EM_X86_64,        "Advanced Micro Devices X86-64"),
-  ENUM_ENT(EM_PDSP,          "Sony DSP processor"),
-  ENUM_ENT(EM_PDP10,         "Digital Equipment Corp. PDP-10"),
-  ENUM_ENT(EM_PDP11,         "Digital Equipment Corp. PDP-11"),
-  ENUM_ENT(EM_FX66,          "Siemens FX66 microcontroller"),
-  ENUM_ENT(EM_ST9PLUS,       "STMicroelectronics ST9+ 8/16 bit microcontroller"),
-  ENUM_ENT(EM_ST7,           "STMicroelectronics ST7 8-bit microcontroller"),
-  ENUM_ENT(EM_68HC16,        "Motorola MC68HC16 Microcontroller"),
-  ENUM_ENT(EM_68HC11,        "Motorola MC68HC11 Microcontroller"),
-  ENUM_ENT(EM_68HC08,        "Motorola MC68HC08 Microcontroller"),
-  ENUM_ENT(EM_68HC05,        "Motorola MC68HC05 Microcontroller"),
-  ENUM_ENT(EM_SVX,           "Silicon Graphics SVx"),
-  ENUM_ENT(EM_ST19,          "STMicroelectronics ST19 8-bit microcontroller"),
-  ENUM_ENT(EM_VAX,           "Digital VAX"),
-  ENUM_ENT(EM_CRIS,          "Axis Communications 32-bit embedded processor"),
-  ENUM_ENT(EM_JAVELIN,       "Infineon Technologies 32-bit embedded cpu"),
-  ENUM_ENT(EM_FIREPATH,      "Element 14 64-bit DSP processor"),
-  ENUM_ENT(EM_ZSP,           "LSI Logic's 16-bit DSP processor"),
-  ENUM_ENT(EM_MMIX,          "Donald Knuth's educational 64-bit processor"),
-  ENUM_ENT(EM_HUANY,         "Harvard Universitys's machine-independent object format"),
-  ENUM_ENT(EM_PRISM,         "Vitesse Prism"),
-  ENUM_ENT(EM_AVR,           "Atmel AVR 8-bit microcontroller"),
-  ENUM_ENT(EM_FR30,          "Fujitsu FR30"),
-  ENUM_ENT(EM_D10V,          "Mitsubishi D10V"),
-  ENUM_ENT(EM_D30V,          "Mitsubishi D30V"),
-  ENUM_ENT(EM_V850,          "NEC v850"),
-  ENUM_ENT(EM_M32R,          "Renesas M32R (formerly Mitsubishi M32r)"),
-  ENUM_ENT(EM_MN10300,       "Matsushita MN10300"),
-  ENUM_ENT(EM_MN10200,       "Matsushita MN10200"),
-  ENUM_ENT(EM_PJ,            "picoJava"),
-  ENUM_ENT(EM_OPENRISC,      "OpenRISC 32-bit embedded processor"),
-  ENUM_ENT(EM_ARC_COMPACT,   "EM_ARC_COMPACT"),
-  ENUM_ENT(EM_XTENSA,        "Tensilica Xtensa Processor"),
-  ENUM_ENT(EM_VIDEOCORE,     "Alphamosaic VideoCore processor"),
-  ENUM_ENT(EM_TMM_GPP,       "Thompson Multimedia General Purpose Processor"),
-  ENUM_ENT(EM_NS32K,         "National Semiconductor 32000 series"),
-  ENUM_ENT(EM_TPC,           "Tenor Network TPC processor"),
-  ENUM_ENT(EM_SNP1K,         "EM_SNP1K"),
-  ENUM_ENT(EM_ST200,         "STMicroelectronics ST200 microcontroller"),
-  ENUM_ENT(EM_IP2K,          "Ubicom IP2xxx 8-bit microcontrollers"),
-  ENUM_ENT(EM_MAX,           "MAX Processor"),
-  ENUM_ENT(EM_CR,            "National Semiconductor CompactRISC"),
-  ENUM_ENT(EM_F2MC16,        "Fujitsu F2MC16"),
-  ENUM_ENT(EM_MSP430,        "Texas Instruments msp430 microcontroller"),
-  ENUM_ENT(EM_BLACKFIN,      "Analog Devices Blackfin"),
-  ENUM_ENT(EM_SE_C33,        "S1C33 Family of Seiko Epson processors"),
-  ENUM_ENT(EM_SEP,           "Sharp embedded microprocessor"),
-  ENUM_ENT(EM_ARCA,          "Arca RISC microprocessor"),
-  ENUM_ENT(EM_UNICORE,       "Unicore"),
-  ENUM_ENT(EM_EXCESS,        "eXcess 16/32/64-bit configurable embedded CPU"),
-  ENUM_ENT(EM_DXP,           "Icera Semiconductor Inc. Deep Execution Processor"),
-  ENUM_ENT(EM_ALTERA_NIOS2,  "Altera Nios"),
-  ENUM_ENT(EM_CRX,           "National Semiconductor CRX microprocessor"),
-  ENUM_ENT(EM_XGATE,         "Motorola XGATE embedded processor"),
-  ENUM_ENT(EM_C166,          "Infineon Technologies xc16x"),
-  ENUM_ENT(EM_M16C,          "Renesas M16C"),
-  ENUM_ENT(EM_DSPIC30F,      "Microchip Technology dsPIC30F Digital Signal Controller"),
-  ENUM_ENT(EM_CE,            "Freescale Communication Engine RISC core"),
-  ENUM_ENT(EM_M32C,          "Renesas M32C"),
-  ENUM_ENT(EM_TSK3000,       "Altium TSK3000 core"),
-  ENUM_ENT(EM_RS08,          "Freescale RS08 embedded processor"),
-  ENUM_ENT(EM_SHARC,         "EM_SHARC"),
-  ENUM_ENT(EM_ECOG2,         "Cyan Technology eCOG2 microprocessor"),
-  ENUM_ENT(EM_SCORE7,        "SUNPLUS S+Core"),
-  ENUM_ENT(EM_DSP24,         "New Japan Radio (NJR) 24-bit DSP Processor"),
-  ENUM_ENT(EM_VIDEOCORE3,    "Broadcom VideoCore III processor"),
-  ENUM_ENT(EM_LATTICEMICO32, "Lattice Mico32"),
-  ENUM_ENT(EM_SE_C17,        "Seiko Epson C17 family"),
-  ENUM_ENT(EM_TI_C6000,      "Texas Instruments TMS320C6000 DSP family"),
-  ENUM_ENT(EM_TI_C2000,      "Texas Instruments TMS320C2000 DSP family"),
-  ENUM_ENT(EM_TI_C5500,      "Texas Instruments TMS320C55x DSP family"),
-  ENUM_ENT(EM_MMDSP_PLUS,    "STMicroelectronics 64bit VLIW Data Signal Processor"),
-  ENUM_ENT(EM_CYPRESS_M8C,   "Cypress M8C microprocessor"),
-  ENUM_ENT(EM_R32C,          "Renesas R32C series microprocessors"),
-  ENUM_ENT(EM_TRIMEDIA,      "NXP Semiconductors TriMedia architecture family"),
-  ENUM_ENT(EM_HEXAGON,       "Qualcomm Hexagon"),
-  ENUM_ENT(EM_8051,          "Intel 8051 and variants"),
-  ENUM_ENT(EM_STXP7X,        "STMicroelectronics STxP7x family"),
-  ENUM_ENT(EM_NDS32,         "Andes Technology compact code size embedded RISC processor family"),
-  ENUM_ENT(EM_ECOG1,         "Cyan Technology eCOG1 microprocessor"),
-  ENUM_ENT(EM_ECOG1X,        "Cyan Technology eCOG1X family"),
-  ENUM_ENT(EM_MAXQ30,        "Dallas Semiconductor MAXQ30 Core microcontrollers"),
-  ENUM_ENT(EM_XIMO16,        "New Japan Radio (NJR) 16-bit DSP Processor"),
-  ENUM_ENT(EM_MANIK,         "M2000 Reconfigurable RISC Microprocessor"),
-  ENUM_ENT(EM_CRAYNV2,       "Cray Inc. NV2 vector architecture"),
-  ENUM_ENT(EM_RX,            "Renesas RX"),
-  ENUM_ENT(EM_METAG,         "Imagination Technologies Meta processor architecture"),
-  ENUM_ENT(EM_MCST_ELBRUS,   "MCST Elbrus general purpose hardware architecture"),
-  ENUM_ENT(EM_ECOG16,        "Cyan Technology eCOG16 family"),
-  ENUM_ENT(EM_CR16,          "Xilinx MicroBlaze"),
-  ENUM_ENT(EM_ETPU,          "Freescale Extended Time Processing Unit"),
-  ENUM_ENT(EM_SLE9X,         "Infineon Technologies SLE9X core"),
-  ENUM_ENT(EM_L10M,          "EM_L10M"),
-  ENUM_ENT(EM_K10M,          "EM_K10M"),
-  ENUM_ENT(EM_AARCH64,       "AArch64"),
-  ENUM_ENT(EM_AVR32,         "Atmel Corporation 32-bit microprocessor family"),
-  ENUM_ENT(EM_STM8,          "STMicroeletronics STM8 8-bit microcontroller"),
-  ENUM_ENT(EM_TILE64,        "Tilera TILE64 multicore architecture family"),
-  ENUM_ENT(EM_TILEPRO,       "Tilera TILEPro multicore architecture family"),
-  ENUM_ENT(EM_CUDA,          "NVIDIA CUDA architecture"),
-  ENUM_ENT(EM_TILEGX,        "Tilera TILE-Gx multicore architecture family"),
-  ENUM_ENT(EM_CLOUDSHIELD,   "EM_CLOUDSHIELD"),
-  ENUM_ENT(EM_COREA_1ST,     "EM_COREA_1ST"),
-  ENUM_ENT(EM_COREA_2ND,     "EM_COREA_2ND"),
-  ENUM_ENT(EM_ARC_COMPACT2,  "EM_ARC_COMPACT2"),
-  ENUM_ENT(EM_OPEN8,         "EM_OPEN8"),
-  ENUM_ENT(EM_RL78,          "Renesas RL78"),
-  ENUM_ENT(EM_VIDEOCORE5,    "Broadcom VideoCore V processor"),
-  ENUM_ENT(EM_78KOR,         "EM_78KOR"),
-  ENUM_ENT(EM_56800EX,       "EM_56800EX"),
-  ENUM_ENT(EM_AMDGPU,        "EM_AMDGPU"),
-  ENUM_ENT(EM_RISCV,         "RISC-V"),
-  ENUM_ENT(EM_LANAI,         "EM_LANAI"),
-  ENUM_ENT(EM_BPF,           "EM_BPF"),
+    ENUM_ENT(EM_NONE, "None"),
+    ENUM_ENT(EM_M32, "WE32100"),
+    ENUM_ENT(EM_SPARC, "Sparc"),
+    ENUM_ENT(EM_386, "Intel 80386"),
+    ENUM_ENT(EM_68K, "MC68000"),
+    ENUM_ENT(EM_88K, "MC88000"),
+    ENUM_ENT(EM_IAMCU, "EM_IAMCU"),
+    ENUM_ENT(EM_860, "Intel 80860"),
+    ENUM_ENT(EM_MIPS, "MIPS R3000"),
+    ENUM_ENT(EM_S370, "IBM System/370"),
+    ENUM_ENT(EM_MIPS_RS3_LE, "MIPS R3000 little-endian"),
+    ENUM_ENT(EM_PARISC, "HPPA"),
+    ENUM_ENT(EM_VPP500, "Fujitsu VPP500"),
+    ENUM_ENT(EM_SPARC32PLUS, "Sparc v8+"),
+    ENUM_ENT(EM_960, "Intel 80960"),
+    ENUM_ENT(EM_PPC, "PowerPC"),
+    ENUM_ENT(EM_PPC64, "PowerPC64"),
+    ENUM_ENT(EM_S390, "IBM S/390"),
+    ENUM_ENT(EM_SPU, "SPU"),
+    ENUM_ENT(EM_V800, "NEC V800 series"),
+    ENUM_ENT(EM_FR20, "Fujistsu FR20"),
+    ENUM_ENT(EM_RH32, "TRW RH-32"),
+    ENUM_ENT(EM_RCE, "Motorola RCE"),
+    ENUM_ENT(EM_ARM, "ARM"),
+    ENUM_ENT(EM_ALPHA, "EM_ALPHA"),
+    ENUM_ENT(EM_SH, "Hitachi SH"),
+    ENUM_ENT(EM_SPARCV9, "Sparc v9"),
+    ENUM_ENT(EM_TRICORE, "Siemens Tricore"),
+    ENUM_ENT(EM_ARC, "ARC"),
+    ENUM_ENT(EM_H8_300, "Hitachi H8/300"),
+    ENUM_ENT(EM_H8_300H, "Hitachi H8/300H"),
+    ENUM_ENT(EM_H8S, "Hitachi H8S"),
+    ENUM_ENT(EM_H8_500, "Hitachi H8/500"),
+    ENUM_ENT(EM_IA_64, "Intel IA-64"),
+    ENUM_ENT(EM_MIPS_X, "Stanford MIPS-X"),
+    ENUM_ENT(EM_COLDFIRE, "Motorola Coldfire"),
+    ENUM_ENT(EM_68HC12, "Motorola MC68HC12 Microcontroller"),
+    ENUM_ENT(EM_MMA, "Fujitsu Multimedia Accelerator"),
+    ENUM_ENT(EM_PCP, "Siemens PCP"),
+    ENUM_ENT(EM_NCPU, "Sony nCPU embedded RISC processor"),
+    ENUM_ENT(EM_NDR1, "Denso NDR1 microprocesspr"),
+    ENUM_ENT(EM_STARCORE, "Motorola Star*Core processor"),
+    ENUM_ENT(EM_ME16, "Toyota ME16 processor"),
+    ENUM_ENT(EM_ST100, "STMicroelectronics ST100 processor"),
+    ENUM_ENT(EM_TINYJ, "Advanced Logic Corp. TinyJ embedded processor"),
+    ENUM_ENT(EM_X86_64, "Advanced Micro Devices X86-64"),
+    ENUM_ENT(EM_PDSP, "Sony DSP processor"),
+    ENUM_ENT(EM_PDP10, "Digital Equipment Corp. PDP-10"),
+    ENUM_ENT(EM_PDP11, "Digital Equipment Corp. PDP-11"),
+    ENUM_ENT(EM_FX66, "Siemens FX66 microcontroller"),
+    ENUM_ENT(EM_ST9PLUS, "STMicroelectronics ST9+ 8/16 bit microcontroller"),
+    ENUM_ENT(EM_ST7, "STMicroelectronics ST7 8-bit microcontroller"),
+    ENUM_ENT(EM_68HC16, "Motorola MC68HC16 Microcontroller"),
+    ENUM_ENT(EM_68HC11, "Motorola MC68HC11 Microcontroller"),
+    ENUM_ENT(EM_68HC08, "Motorola MC68HC08 Microcontroller"),
+    ENUM_ENT(EM_68HC05, "Motorola MC68HC05 Microcontroller"),
+    ENUM_ENT(EM_SVX, "Silicon Graphics SVx"),
+    ENUM_ENT(EM_ST19, "STMicroelectronics ST19 8-bit microcontroller"),
+    ENUM_ENT(EM_VAX, "Digital VAX"),
+    ENUM_ENT(EM_CRIS, "Axis Communications 32-bit embedded processor"),
+    ENUM_ENT(EM_JAVELIN, "Infineon Technologies 32-bit embedded cpu"),
+    ENUM_ENT(EM_FIREPATH, "Element 14 64-bit DSP processor"),
+    ENUM_ENT(EM_ZSP, "LSI Logic's 16-bit DSP processor"),
+    ENUM_ENT(EM_MMIX, "Donald Knuth's educational 64-bit processor"),
+    ENUM_ENT(EM_HUANY,
+             "Harvard Universitys's machine-independent object format"),
+    ENUM_ENT(EM_PRISM, "Vitesse Prism"),
+    ENUM_ENT(EM_AVR, "Atmel AVR 8-bit microcontroller"),
+    ENUM_ENT(EM_FR30, "Fujitsu FR30"),
+    ENUM_ENT(EM_D10V, "Mitsubishi D10V"),
+    ENUM_ENT(EM_D30V, "Mitsubishi D30V"),
+    ENUM_ENT(EM_V850, "NEC v850"),
+    ENUM_ENT(EM_M32R, "Renesas M32R (formerly Mitsubishi M32r)"),
+    ENUM_ENT(EM_MN10300, "Matsushita MN10300"),
+    ENUM_ENT(EM_MN10200, "Matsushita MN10200"),
+    ENUM_ENT(EM_PJ, "picoJava"),
+    ENUM_ENT(EM_OPENRISC, "OpenRISC 32-bit embedded processor"),
+    ENUM_ENT(EM_ARC_COMPACT, "EM_ARC_COMPACT"),
+    ENUM_ENT(EM_XTENSA, "Tensilica Xtensa Processor"),
+    ENUM_ENT(EM_VIDEOCORE, "Alphamosaic VideoCore processor"),
+    ENUM_ENT(EM_TMM_GPP, "Thompson Multimedia General Purpose Processor"),
+    ENUM_ENT(EM_NS32K, "National Semiconductor 32000 series"),
+    ENUM_ENT(EM_TPC, "Tenor Network TPC processor"),
+    ENUM_ENT(EM_SNP1K, "EM_SNP1K"),
+    ENUM_ENT(EM_ST200, "STMicroelectronics ST200 microcontroller"),
+    ENUM_ENT(EM_IP2K, "Ubicom IP2xxx 8-bit microcontrollers"),
+    ENUM_ENT(EM_MAX, "MAX Processor"),
+    ENUM_ENT(EM_CR, "National Semiconductor CompactRISC"),
+    ENUM_ENT(EM_F2MC16, "Fujitsu F2MC16"),
+    ENUM_ENT(EM_MSP430, "Texas Instruments msp430 microcontroller"),
+    ENUM_ENT(EM_BLACKFIN, "Analog Devices Blackfin"),
+    ENUM_ENT(EM_SE_C33, "S1C33 Family of Seiko Epson processors"),
+    ENUM_ENT(EM_SEP, "Sharp embedded microprocessor"),
+    ENUM_ENT(EM_ARCA, "Arca RISC microprocessor"),
+    ENUM_ENT(EM_UNICORE, "Unicore"),
+    ENUM_ENT(EM_EXCESS, "eXcess 16/32/64-bit configurable embedded CPU"),
+    ENUM_ENT(EM_DXP, "Icera Semiconductor Inc. Deep Execution Processor"),
+    ENUM_ENT(EM_ALTERA_NIOS2, "Altera Nios"),
+    ENUM_ENT(EM_CRX, "National Semiconductor CRX microprocessor"),
+    ENUM_ENT(EM_XGATE, "Motorola XGATE embedded processor"),
+    ENUM_ENT(EM_C166, "Infineon Technologies xc16x"),
+    ENUM_ENT(EM_M16C, "Renesas M16C"),
+    ENUM_ENT(EM_DSPIC30F,
+             "Microchip Technology dsPIC30F Digital Signal Controller"),
+    ENUM_ENT(EM_CE, "Freescale Communication Engine RISC core"),
+    ENUM_ENT(EM_M32C, "Renesas M32C"),
+    ENUM_ENT(EM_TSK3000, "Altium TSK3000 core"),
+    ENUM_ENT(EM_RS08, "Freescale RS08 embedded processor"),
+    ENUM_ENT(EM_SHARC, "EM_SHARC"),
+    ENUM_ENT(EM_ECOG2, "Cyan Technology eCOG2 microprocessor"),
+    ENUM_ENT(EM_SCORE7, "SUNPLUS S+Core"),
+    ENUM_ENT(EM_DSP24, "New Japan Radio (NJR) 24-bit DSP Processor"),
+    ENUM_ENT(EM_VIDEOCORE3, "Broadcom VideoCore III processor"),
+    ENUM_ENT(EM_LATTICEMICO32, "Lattice Mico32"),
+    ENUM_ENT(EM_SE_C17, "Seiko Epson C17 family"),
+    ENUM_ENT(EM_TI_C6000, "Texas Instruments TMS320C6000 DSP family"),
+    ENUM_ENT(EM_TI_C2000, "Texas Instruments TMS320C2000 DSP family"),
+    ENUM_ENT(EM_TI_C5500, "Texas Instruments TMS320C55x DSP family"),
+    ENUM_ENT(EM_MMDSP_PLUS,
+             "STMicroelectronics 64bit VLIW Data Signal Processor"),
+    ENUM_ENT(EM_CYPRESS_M8C, "Cypress M8C microprocessor"),
+    ENUM_ENT(EM_R32C, "Renesas R32C series microprocessors"),
+    ENUM_ENT(EM_TRIMEDIA, "NXP Semiconductors TriMedia architecture family"),
+    ENUM_ENT(EM_HEXAGON, "Qualcomm Hexagon"),
+    ENUM_ENT(EM_8051, "Intel 8051 and variants"),
+    ENUM_ENT(EM_STXP7X, "STMicroelectronics STxP7x family"),
+    ENUM_ENT(
+        EM_NDS32,
+        "Andes Technology compact code size embedded RISC processor family"),
+    ENUM_ENT(EM_ECOG1, "Cyan Technology eCOG1 microprocessor"),
+    ENUM_ENT(EM_ECOG1X, "Cyan Technology eCOG1X family"),
+    ENUM_ENT(EM_MAXQ30, "Dallas Semiconductor MAXQ30 Core microcontrollers"),
+    ENUM_ENT(EM_XIMO16, "New Japan Radio (NJR) 16-bit DSP Processor"),
+    ENUM_ENT(EM_MANIK, "M2000 Reconfigurable RISC Microprocessor"),
+    ENUM_ENT(EM_CRAYNV2, "Cray Inc. NV2 vector architecture"),
+    ENUM_ENT(EM_RX, "Renesas RX"),
+    ENUM_ENT(EM_METAG, "Imagination Technologies Meta processor architecture"),
+    ENUM_ENT(EM_MCST_ELBRUS,
+             "MCST Elbrus general purpose hardware architecture"),
+    ENUM_ENT(EM_ECOG16, "Cyan Technology eCOG16 family"),
+    ENUM_ENT(EM_CR16, "Xilinx MicroBlaze"),
+    ENUM_ENT(EM_ETPU, "Freescale Extended Time Processing Unit"),
+    ENUM_ENT(EM_SLE9X, "Infineon Technologies SLE9X core"),
+    ENUM_ENT(EM_L10M, "EM_L10M"),
+    ENUM_ENT(EM_K10M, "EM_K10M"),
+    ENUM_ENT(EM_AARCH64, "AArch64"),
+    ENUM_ENT(EM_AVR32, "Atmel Corporation 32-bit microprocessor family"),
+    ENUM_ENT(EM_STM8, "STMicroeletronics STM8 8-bit microcontroller"),
+    ENUM_ENT(EM_TILE64, "Tilera TILE64 multicore architecture family"),
+    ENUM_ENT(EM_TILEPRO, "Tilera TILEPro multicore architecture family"),
+    ENUM_ENT(EM_CUDA, "NVIDIA CUDA architecture"),
+    ENUM_ENT(EM_TILEGX, "Tilera TILE-Gx multicore architecture family"),
+    ENUM_ENT(EM_CLOUDSHIELD, "EM_CLOUDSHIELD"),
+    ENUM_ENT(EM_COREA_1ST, "EM_COREA_1ST"),
+    ENUM_ENT(EM_COREA_2ND, "EM_COREA_2ND"),
+    ENUM_ENT(EM_ARC_COMPACT2, "EM_ARC_COMPACT2"),
+    ENUM_ENT(EM_OPEN8, "EM_OPEN8"),
+    ENUM_ENT(EM_RL78, "Renesas RL78"),
+    ENUM_ENT(EM_VIDEOCORE5, "Broadcom VideoCore V processor"),
+    ENUM_ENT(EM_78KOR, "EM_78KOR"),
+    ENUM_ENT(EM_56800EX, "EM_56800EX"),
+    ENUM_ENT(EM_AMDGPU, "EM_AMDGPU"),
+    ENUM_ENT(EM_RISCV, "RISC-V"),
+    ENUM_ENT(EM_LANAI, "EM_LANAI"),
+    ENUM_ENT(EM_BPF, "EM_BPF"),
 };
 
 static const EnumEntry<unsigned> ElfSymbolBindings[] = {
-    {"Local",  "LOCAL",  ELF::STB_LOCAL},
+    {"Local", "LOCAL", ELF::STB_LOCAL},
     {"Global", "GLOBAL", ELF::STB_GLOBAL},
-    {"Weak",   "WEAK",   ELF::STB_WEAK},
+    {"Weak", "WEAK", ELF::STB_WEAK},
     {"Unique", "UNIQUE", ELF::STB_GNU_UNIQUE}};
 
 static const EnumEntry<unsigned> ElfSymbolVisibilities[] = {
-    {"DEFAULT",   "DEFAULT",   ELF::STV_DEFAULT},
-    {"INTERNAL",  "INTERNAL",  ELF::STV_INTERNAL},
-    {"HIDDEN",    "HIDDEN",    ELF::STV_HIDDEN},
+    {"DEFAULT", "DEFAULT", ELF::STV_DEFAULT},
+    {"INTERNAL", "INTERNAL", ELF::STV_INTERNAL},
+    {"HIDDEN", "HIDDEN", ELF::STV_HIDDEN},
     {"PROTECTED", "PROTECTED", ELF::STV_PROTECTED}};
 
 static const EnumEntry<unsigned> AMDGPUSymbolTypes[] = {
-  { "AMDGPU_HSA_KERNEL",            ELF::STT_AMDGPU_HSA_KERNEL }
-};
+    {"AMDGPU_HSA_KERNEL", ELF::STT_AMDGPU_HSA_KERNEL}};
 
 static const char *getGroupType(uint32_t Flag) {
   if (Flag & ELF::GRP_COMDAT)
@@ -1031,49 +1035,44 @@ static const char *getGroupType(uint32_t
 }
 
 static const EnumEntry<unsigned> ElfSectionFlags[] = {
-  ENUM_ENT(SHF_WRITE,            "W"),
-  ENUM_ENT(SHF_ALLOC,            "A"),
-  ENUM_ENT(SHF_EXCLUDE,          "E"),
-  ENUM_ENT(SHF_EXECINSTR,        "X"),
-  ENUM_ENT(SHF_MERGE,            "M"),
-  ENUM_ENT(SHF_STRINGS,          "S"),
-  ENUM_ENT(SHF_INFO_LINK,        "I"),
-  ENUM_ENT(SHF_LINK_ORDER,       "L"),
-  ENUM_ENT(SHF_OS_NONCONFORMING, "o"),
-  ENUM_ENT(SHF_GROUP,            "G"),
-  ENUM_ENT(SHF_TLS,              "T"),
-  ENUM_ENT(SHF_MASKOS,           "o"),
-  ENUM_ENT(SHF_MASKPROC,         "p"),
-  ENUM_ENT_1(SHF_COMPRESSED),
+    ENUM_ENT(SHF_WRITE, "W"),
+    ENUM_ENT(SHF_ALLOC, "A"),
+    ENUM_ENT(SHF_EXCLUDE, "E"),
+    ENUM_ENT(SHF_EXECINSTR, "X"),
+    ENUM_ENT(SHF_MERGE, "M"),
+    ENUM_ENT(SHF_STRINGS, "S"),
+    ENUM_ENT(SHF_INFO_LINK, "I"),
+    ENUM_ENT(SHF_LINK_ORDER, "L"),
+    ENUM_ENT(SHF_OS_NONCONFORMING, "o"),
+    ENUM_ENT(SHF_GROUP, "G"),
+    ENUM_ENT(SHF_TLS, "T"),
+    ENUM_ENT(SHF_MASKOS, "o"),
+    ENUM_ENT(SHF_MASKPROC, "p"),
+    ENUM_ENT_1(SHF_COMPRESSED),
 };
 
 static const EnumEntry<unsigned> ElfXCoreSectionFlags[] = {
-  LLVM_READOBJ_ENUM_ENT(ELF, XCORE_SHF_CP_SECTION),
-  LLVM_READOBJ_ENUM_ENT(ELF, XCORE_SHF_DP_SECTION)
-};
+    LLVM_READOBJ_ENUM_ENT(ELF, XCORE_SHF_CP_SECTION),
+    LLVM_READOBJ_ENUM_ENT(ELF, XCORE_SHF_DP_SECTION)};
 
 static const EnumEntry<unsigned> ElfARMSectionFlags[] = {
-  LLVM_READOBJ_ENUM_ENT(ELF, SHF_ARM_PURECODE)
-};
+    LLVM_READOBJ_ENUM_ENT(ELF, SHF_ARM_PURECODE)};
 
 static const EnumEntry<unsigned> ElfHexagonSectionFlags[] = {
-  LLVM_READOBJ_ENUM_ENT(ELF, SHF_HEX_GPREL)
-};
+    LLVM_READOBJ_ENUM_ENT(ELF, SHF_HEX_GPREL)};
 
 static const EnumEntry<unsigned> ElfMipsSectionFlags[] = {
-  LLVM_READOBJ_ENUM_ENT(ELF, SHF_MIPS_NODUPES),
-  LLVM_READOBJ_ENUM_ENT(ELF, SHF_MIPS_NAMES  ),
-  LLVM_READOBJ_ENUM_ENT(ELF, SHF_MIPS_LOCAL  ),
-  LLVM_READOBJ_ENUM_ENT(ELF, SHF_MIPS_NOSTRIP),
-  LLVM_READOBJ_ENUM_ENT(ELF, SHF_MIPS_GPREL  ),
-  LLVM_READOBJ_ENUM_ENT(ELF, SHF_MIPS_MERGE  ),
-  LLVM_READOBJ_ENUM_ENT(ELF, SHF_MIPS_ADDR   ),
-  LLVM_READOBJ_ENUM_ENT(ELF, SHF_MIPS_STRING )
-};
+    LLVM_READOBJ_ENUM_ENT(ELF, SHF_MIPS_NODUPES),
+    LLVM_READOBJ_ENUM_ENT(ELF, SHF_MIPS_NAMES),
+    LLVM_READOBJ_ENUM_ENT(ELF, SHF_MIPS_LOCAL),
+    LLVM_READOBJ_ENUM_ENT(ELF, SHF_MIPS_NOSTRIP),
+    LLVM_READOBJ_ENUM_ENT(ELF, SHF_MIPS_GPREL),
+    LLVM_READOBJ_ENUM_ENT(ELF, SHF_MIPS_MERGE),
+    LLVM_READOBJ_ENUM_ENT(ELF, SHF_MIPS_ADDR),
+    LLVM_READOBJ_ENUM_ENT(ELF, SHF_MIPS_STRING)};
 
 static const EnumEntry<unsigned> ElfX86_64SectionFlags[] = {
-  LLVM_READOBJ_ENUM_ENT(ELF, SHF_X86_64_LARGE)
-};
+    LLVM_READOBJ_ENUM_ENT(ELF, SHF_X86_64_LARGE)};
 
 static std::string getGNUFlags(uint64_t Flags) {
   std::string Str;
@@ -1111,42 +1110,41 @@ static const char *getElfSegmentType(uns
   // program header type.
   switch (Arch) {
   case ELF::EM_ARM:
-    switch (Type) {
-    LLVM_READOBJ_ENUM_CASE(ELF, PT_ARM_EXIDX);
-    }
+    switch (Type) { LLVM_READOBJ_ENUM_CASE(ELF, PT_ARM_EXIDX); }
     break;
   case ELF::EM_MIPS:
   case ELF::EM_MIPS_RS3_LE:
     switch (Type) {
-    LLVM_READOBJ_ENUM_CASE(ELF, PT_MIPS_REGINFO);
-    LLVM_READOBJ_ENUM_CASE(ELF, PT_MIPS_RTPROC);
-    LLVM_READOBJ_ENUM_CASE(ELF, PT_MIPS_OPTIONS);
-    LLVM_READOBJ_ENUM_CASE(ELF, PT_MIPS_ABIFLAGS);
+      LLVM_READOBJ_ENUM_CASE(ELF, PT_MIPS_REGINFO);
+      LLVM_READOBJ_ENUM_CASE(ELF, PT_MIPS_RTPROC);
+      LLVM_READOBJ_ENUM_CASE(ELF, PT_MIPS_OPTIONS);
+      LLVM_READOBJ_ENUM_CASE(ELF, PT_MIPS_ABIFLAGS);
     }
     break;
   }
 
   switch (Type) {
-  LLVM_READOBJ_ENUM_CASE(ELF, PT_NULL   );
-  LLVM_READOBJ_ENUM_CASE(ELF, PT_LOAD   );
-  LLVM_READOBJ_ENUM_CASE(ELF, PT_DYNAMIC);
-  LLVM_READOBJ_ENUM_CASE(ELF, PT_INTERP );
-  LLVM_READOBJ_ENUM_CASE(ELF, PT_NOTE   );
-  LLVM_READOBJ_ENUM_CASE(ELF, PT_SHLIB  );
-  LLVM_READOBJ_ENUM_CASE(ELF, PT_PHDR   );
-  LLVM_READOBJ_ENUM_CASE(ELF, PT_TLS    );
-
-  LLVM_READOBJ_ENUM_CASE(ELF, PT_GNU_EH_FRAME);
-  LLVM_READOBJ_ENUM_CASE(ELF, PT_SUNW_UNWIND);
-
-  LLVM_READOBJ_ENUM_CASE(ELF, PT_GNU_STACK);
-  LLVM_READOBJ_ENUM_CASE(ELF, PT_GNU_RELRO);
-
-  LLVM_READOBJ_ENUM_CASE(ELF, PT_OPENBSD_RANDOMIZE);
-  LLVM_READOBJ_ENUM_CASE(ELF, PT_OPENBSD_WXNEEDED);
-  LLVM_READOBJ_ENUM_CASE(ELF, PT_OPENBSD_BOOTDATA);
+    LLVM_READOBJ_ENUM_CASE(ELF, PT_NULL);
+    LLVM_READOBJ_ENUM_CASE(ELF, PT_LOAD);
+    LLVM_READOBJ_ENUM_CASE(ELF, PT_DYNAMIC);
+    LLVM_READOBJ_ENUM_CASE(ELF, PT_INTERP);
+    LLVM_READOBJ_ENUM_CASE(ELF, PT_NOTE);
+    LLVM_READOBJ_ENUM_CASE(ELF, PT_SHLIB);
+    LLVM_READOBJ_ENUM_CASE(ELF, PT_PHDR);
+    LLVM_READOBJ_ENUM_CASE(ELF, PT_TLS);
+
+    LLVM_READOBJ_ENUM_CASE(ELF, PT_GNU_EH_FRAME);
+    LLVM_READOBJ_ENUM_CASE(ELF, PT_SUNW_UNWIND);
+
+    LLVM_READOBJ_ENUM_CASE(ELF, PT_GNU_STACK);
+    LLVM_READOBJ_ENUM_CASE(ELF, PT_GNU_RELRO);
+
+    LLVM_READOBJ_ENUM_CASE(ELF, PT_OPENBSD_RANDOMIZE);
+    LLVM_READOBJ_ENUM_CASE(ELF, PT_OPENBSD_WXNEEDED);
+    LLVM_READOBJ_ENUM_CASE(ELF, PT_OPENBSD_BOOTDATA);
 
-  default: return "";
+  default:
+    return "";
   }
 }
 
@@ -1190,137 +1188,129 @@ static std::string getElfPtType(unsigned
 }
 
 static const EnumEntry<unsigned> ElfSegmentFlags[] = {
-  LLVM_READOBJ_ENUM_ENT(ELF, PF_X),
-  LLVM_READOBJ_ENUM_ENT(ELF, PF_W),
-  LLVM_READOBJ_ENUM_ENT(ELF, PF_R)
-};
+    LLVM_READOBJ_ENUM_ENT(ELF, PF_X), LLVM_READOBJ_ENUM_ENT(ELF, PF_W),
+    LLVM_READOBJ_ENUM_ENT(ELF, PF_R)};
 
 static const EnumEntry<unsigned> ElfHeaderMipsFlags[] = {
-  ENUM_ENT(EF_MIPS_NOREORDER, "noreorder"),
-  ENUM_ENT(EF_MIPS_PIC, "pic"),
-  ENUM_ENT(EF_MIPS_CPIC, "cpic"),
-  ENUM_ENT(EF_MIPS_ABI2, "abi2"),
-  ENUM_ENT(EF_MIPS_32BITMODE, "32bitmode"),
-  ENUM_ENT(EF_MIPS_FP64, "fp64"),
-  ENUM_ENT(EF_MIPS_NAN2008, "nan2008"),
-  ENUM_ENT(EF_MIPS_ABI_O32, "o32"),
-  ENUM_ENT(EF_MIPS_ABI_O64, "o64"),
-  ENUM_ENT(EF_MIPS_ABI_EABI32, "eabi32"),
-  ENUM_ENT(EF_MIPS_ABI_EABI64, "eabi64"),
-  ENUM_ENT(EF_MIPS_MACH_3900, "3900"),
-  ENUM_ENT(EF_MIPS_MACH_4010, "4010"),
-  ENUM_ENT(EF_MIPS_MACH_4100, "4100"),
-  ENUM_ENT(EF_MIPS_MACH_4650, "4650"),
-  ENUM_ENT(EF_MIPS_MACH_4120, "4120"),
-  ENUM_ENT(EF_MIPS_MACH_4111, "4111"),
-  ENUM_ENT(EF_MIPS_MACH_SB1, "sb1"),
-  ENUM_ENT(EF_MIPS_MACH_OCTEON, "octeon"),
-  ENUM_ENT(EF_MIPS_MACH_XLR, "xlr"),
-  ENUM_ENT(EF_MIPS_MACH_OCTEON2, "octeon2"),
-  ENUM_ENT(EF_MIPS_MACH_OCTEON3, "octeon3"),
-  ENUM_ENT(EF_MIPS_MACH_5400, "5400"),
-  ENUM_ENT(EF_MIPS_MACH_5900, "5900"),
-  ENUM_ENT(EF_MIPS_MACH_5500, "5500"),
-  ENUM_ENT(EF_MIPS_MACH_9000, "9000"),
-  ENUM_ENT(EF_MIPS_MACH_LS2E, "loongson-2e"),
-  ENUM_ENT(EF_MIPS_MACH_LS2F, "loongson-2f"),
-  ENUM_ENT(EF_MIPS_MACH_LS3A, "loongson-3a"),
-  ENUM_ENT(EF_MIPS_MICROMIPS, "micromips"),
-  ENUM_ENT(EF_MIPS_ARCH_ASE_M16, "mips16"),
-  ENUM_ENT(EF_MIPS_ARCH_ASE_MDMX, "mdmx"),
-  ENUM_ENT(EF_MIPS_ARCH_1, "mips1"),
-  ENUM_ENT(EF_MIPS_ARCH_2, "mips2"),
-  ENUM_ENT(EF_MIPS_ARCH_3, "mips3"),
-  ENUM_ENT(EF_MIPS_ARCH_4, "mips4"),
-  ENUM_ENT(EF_MIPS_ARCH_5, "mips5"),
-  ENUM_ENT(EF_MIPS_ARCH_32, "mips32"),
-  ENUM_ENT(EF_MIPS_ARCH_64, "mips64"),
-  ENUM_ENT(EF_MIPS_ARCH_32R2, "mips32r2"),
-  ENUM_ENT(EF_MIPS_ARCH_64R2, "mips64r2"),
-  ENUM_ENT(EF_MIPS_ARCH_32R6, "mips32r6"),
-  ENUM_ENT(EF_MIPS_ARCH_64R6, "mips64r6")
-};
+    ENUM_ENT(EF_MIPS_NOREORDER, "noreorder"),
+    ENUM_ENT(EF_MIPS_PIC, "pic"),
+    ENUM_ENT(EF_MIPS_CPIC, "cpic"),
+    ENUM_ENT(EF_MIPS_ABI2, "abi2"),
+    ENUM_ENT(EF_MIPS_32BITMODE, "32bitmode"),
+    ENUM_ENT(EF_MIPS_FP64, "fp64"),
+    ENUM_ENT(EF_MIPS_NAN2008, "nan2008"),
+    ENUM_ENT(EF_MIPS_ABI_O32, "o32"),
+    ENUM_ENT(EF_MIPS_ABI_O64, "o64"),
+    ENUM_ENT(EF_MIPS_ABI_EABI32, "eabi32"),
+    ENUM_ENT(EF_MIPS_ABI_EABI64, "eabi64"),
+    ENUM_ENT(EF_MIPS_MACH_3900, "3900"),
+    ENUM_ENT(EF_MIPS_MACH_4010, "4010"),
+    ENUM_ENT(EF_MIPS_MACH_4100, "4100"),
+    ENUM_ENT(EF_MIPS_MACH_4650, "4650"),
+    ENUM_ENT(EF_MIPS_MACH_4120, "4120"),
+    ENUM_ENT(EF_MIPS_MACH_4111, "4111"),
+    ENUM_ENT(EF_MIPS_MACH_SB1, "sb1"),
+    ENUM_ENT(EF_MIPS_MACH_OCTEON, "octeon"),
+    ENUM_ENT(EF_MIPS_MACH_XLR, "xlr"),
+    ENUM_ENT(EF_MIPS_MACH_OCTEON2, "octeon2"),
+    ENUM_ENT(EF_MIPS_MACH_OCTEON3, "octeon3"),
+    ENUM_ENT(EF_MIPS_MACH_5400, "5400"),
+    ENUM_ENT(EF_MIPS_MACH_5900, "5900"),
+    ENUM_ENT(EF_MIPS_MACH_5500, "5500"),
+    ENUM_ENT(EF_MIPS_MACH_9000, "9000"),
+    ENUM_ENT(EF_MIPS_MACH_LS2E, "loongson-2e"),
+    ENUM_ENT(EF_MIPS_MACH_LS2F, "loongson-2f"),
+    ENUM_ENT(EF_MIPS_MACH_LS3A, "loongson-3a"),
+    ENUM_ENT(EF_MIPS_MICROMIPS, "micromips"),
+    ENUM_ENT(EF_MIPS_ARCH_ASE_M16, "mips16"),
+    ENUM_ENT(EF_MIPS_ARCH_ASE_MDMX, "mdmx"),
+    ENUM_ENT(EF_MIPS_ARCH_1, "mips1"),
+    ENUM_ENT(EF_MIPS_ARCH_2, "mips2"),
+    ENUM_ENT(EF_MIPS_ARCH_3, "mips3"),
+    ENUM_ENT(EF_MIPS_ARCH_4, "mips4"),
+    ENUM_ENT(EF_MIPS_ARCH_5, "mips5"),
+    ENUM_ENT(EF_MIPS_ARCH_32, "mips32"),
+    ENUM_ENT(EF_MIPS_ARCH_64, "mips64"),
+    ENUM_ENT(EF_MIPS_ARCH_32R2, "mips32r2"),
+    ENUM_ENT(EF_MIPS_ARCH_64R2, "mips64r2"),
+    ENUM_ENT(EF_MIPS_ARCH_32R6, "mips32r6"),
+    ENUM_ENT(EF_MIPS_ARCH_64R6, "mips64r6")};
 
 static const EnumEntry<unsigned> ElfHeaderAMDGPUFlags[] = {
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_NONE),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_R600),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_R630),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_RS880),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_RV670),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_RV710),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_RV730),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_RV770),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_CEDAR),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_CYPRESS),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_JUNIPER),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_REDWOOD),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_SUMO),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_BARTS),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_CAICOS),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_CAYMAN),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_TURKS),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX600),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX601),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX700),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX701),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX702),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX703),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX704),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX801),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX802),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX803),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX810),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX900),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX902),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX904),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX906),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX909),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX1010),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_XNACK),
-  LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_SRAM_ECC)
-};
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_NONE),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_R600),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_R630),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_RS880),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_RV670),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_RV710),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_RV730),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_RV770),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_CEDAR),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_CYPRESS),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_JUNIPER),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_REDWOOD),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_SUMO),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_BARTS),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_CAICOS),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_CAYMAN),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_R600_TURKS),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX600),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX601),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX700),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX701),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX702),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX703),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX704),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX801),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX802),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX803),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX810),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX900),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX902),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX904),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX906),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX909),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX1010),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_XNACK),
+    LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_SRAM_ECC)};
 
 static const EnumEntry<unsigned> ElfHeaderRISCVFlags[] = {
-  ENUM_ENT(EF_RISCV_RVC, "RVC"),
-  ENUM_ENT(EF_RISCV_FLOAT_ABI_SINGLE, "single-float ABI"),
-  ENUM_ENT(EF_RISCV_FLOAT_ABI_DOUBLE, "double-float ABI"),
-  ENUM_ENT(EF_RISCV_FLOAT_ABI_QUAD, "quad-float ABI"),
-  ENUM_ENT(EF_RISCV_RVE, "RVE")
-};
+    ENUM_ENT(EF_RISCV_RVC, "RVC"),
+    ENUM_ENT(EF_RISCV_FLOAT_ABI_SINGLE, "single-float ABI"),
+    ENUM_ENT(EF_RISCV_FLOAT_ABI_DOUBLE, "double-float ABI"),
+    ENUM_ENT(EF_RISCV_FLOAT_ABI_QUAD, "quad-float ABI"),
+    ENUM_ENT(EF_RISCV_RVE, "RVE")};
 
 static const EnumEntry<unsigned> ElfSymOtherFlags[] = {
-  LLVM_READOBJ_ENUM_ENT(ELF, STV_INTERNAL),
-  LLVM_READOBJ_ENUM_ENT(ELF, STV_HIDDEN),
-  LLVM_READOBJ_ENUM_ENT(ELF, STV_PROTECTED)
-};
+    LLVM_READOBJ_ENUM_ENT(ELF, STV_INTERNAL),
+    LLVM_READOBJ_ENUM_ENT(ELF, STV_HIDDEN),
+    LLVM_READOBJ_ENUM_ENT(ELF, STV_PROTECTED)};
 
 static const EnumEntry<unsigned> ElfMipsSymOtherFlags[] = {
-  LLVM_READOBJ_ENUM_ENT(ELF, STO_MIPS_OPTIONAL),
-  LLVM_READOBJ_ENUM_ENT(ELF, STO_MIPS_PLT),
-  LLVM_READOBJ_ENUM_ENT(ELF, STO_MIPS_PIC),
-  LLVM_READOBJ_ENUM_ENT(ELF, STO_MIPS_MICROMIPS)
-};
+    LLVM_READOBJ_ENUM_ENT(ELF, STO_MIPS_OPTIONAL),
+    LLVM_READOBJ_ENUM_ENT(ELF, STO_MIPS_PLT),
+    LLVM_READOBJ_ENUM_ENT(ELF, STO_MIPS_PIC),
+    LLVM_READOBJ_ENUM_ENT(ELF, STO_MIPS_MICROMIPS)};
 
 static const EnumEntry<unsigned> ElfMips16SymOtherFlags[] = {
-  LLVM_READOBJ_ENUM_ENT(ELF, STO_MIPS_OPTIONAL),
-  LLVM_READOBJ_ENUM_ENT(ELF, STO_MIPS_PLT),
-  LLVM_READOBJ_ENUM_ENT(ELF, STO_MIPS_MIPS16)
-};
+    LLVM_READOBJ_ENUM_ENT(ELF, STO_MIPS_OPTIONAL),
+    LLVM_READOBJ_ENUM_ENT(ELF, STO_MIPS_PLT),
+    LLVM_READOBJ_ENUM_ENT(ELF, STO_MIPS_MIPS16)};
 
 static const char *getElfMipsOptionsOdkType(unsigned Odk) {
   switch (Odk) {
-  LLVM_READOBJ_ENUM_CASE(ELF, ODK_NULL);
-  LLVM_READOBJ_ENUM_CASE(ELF, ODK_REGINFO);
-  LLVM_READOBJ_ENUM_CASE(ELF, ODK_EXCEPTIONS);
-  LLVM_READOBJ_ENUM_CASE(ELF, ODK_PAD);
-  LLVM_READOBJ_ENUM_CASE(ELF, ODK_HWPATCH);
-  LLVM_READOBJ_ENUM_CASE(ELF, ODK_FILL);
-  LLVM_READOBJ_ENUM_CASE(ELF, ODK_TAGS);
-  LLVM_READOBJ_ENUM_CASE(ELF, ODK_HWAND);
-  LLVM_READOBJ_ENUM_CASE(ELF, ODK_HWOR);
-  LLVM_READOBJ_ENUM_CASE(ELF, ODK_GP_GROUP);
-  LLVM_READOBJ_ENUM_CASE(ELF, ODK_IDENT);
-  LLVM_READOBJ_ENUM_CASE(ELF, ODK_PAGESIZE);
+    LLVM_READOBJ_ENUM_CASE(ELF, ODK_NULL);
+    LLVM_READOBJ_ENUM_CASE(ELF, ODK_REGINFO);
+    LLVM_READOBJ_ENUM_CASE(ELF, ODK_EXCEPTIONS);
+    LLVM_READOBJ_ENUM_CASE(ELF, ODK_PAD);
+    LLVM_READOBJ_ENUM_CASE(ELF, ODK_HWPATCH);
+    LLVM_READOBJ_ENUM_CASE(ELF, ODK_FILL);
+    LLVM_READOBJ_ENUM_CASE(ELF, ODK_TAGS);
+    LLVM_READOBJ_ENUM_CASE(ELF, ODK_HWAND);
+    LLVM_READOBJ_ENUM_CASE(ELF, ODK_HWOR);
+    LLVM_READOBJ_ENUM_CASE(ELF, ODK_GP_GROUP);
+    LLVM_READOBJ_ENUM_CASE(ELF, ODK_IDENT);
+    LLVM_READOBJ_ENUM_CASE(ELF, ODK_PAGESIZE);
   default:
     return "Unknown";
   }
@@ -1328,7 +1318,7 @@ static const char *getElfMipsOptionsOdkT
 
 template <typename ELFT>
 ELFDumper<ELFT>::ELFDumper(const object::ELFObjectFile<ELFT> *ObjF,
-    ScopedPrinter &Writer)
+                           ScopedPrinter &Writer)
     : ObjDumper(Writer), ObjF(ObjF) {
   SmallVector<const Elf_Phdr *, 4> LoadSegments;
   const ELFFile<ELFT> *Obj = ObjF->getELFFile();
@@ -1501,18 +1491,15 @@ typename ELFDumper<ELFT>::Elf_Relr_Range
   return DynRelrRegion.getAsArrayRef<Elf_Relr>();
 }
 
-template <class ELFT>
-void ELFDumper<ELFT>::printFileHeaders() {
+template <class ELFT> void ELFDumper<ELFT>::printFileHeaders() {
   ELFDumperStyle->printFileHeaders(ObjF->getELFFile());
 }
 
-template <class ELFT>
-void ELFDumper<ELFT>::printSectionHeaders() {
+template <class ELFT> void ELFDumper<ELFT>::printSectionHeaders() {
   ELFDumperStyle->printSectionHeaders(ObjF->getELFFile());
 }
 
-template <class ELFT>
-void ELFDumper<ELFT>::printRelocations() {
+template <class ELFT> void ELFDumper<ELFT>::printRelocations() {
   ELFDumperStyle->printRelocations(ObjF->getELFFile());
 }
 
@@ -1548,8 +1535,7 @@ void ELFDumper<ELFT>::printSymbols(bool
                                PrintDynamicSymbols);
 }
 
-template <class ELFT>
-void ELFDumper<ELFT>::printHashSymbols() {
+template <class ELFT> void ELFDumper<ELFT>::printHashSymbols() {
   ELFDumperStyle->printHashSymbols(ObjF->getELFFile());
 }
 
@@ -1575,8 +1561,8 @@ static const char *getTypeString(unsigne
   case EM_HEXAGON:
     switch (Type) {
 #define HEXAGON_DYNAMIC_TAG(name, value)                                       \
-    case DT_##name:                                                            \
-      return #name;
+  case DT_##name:                                                              \
+    return #name;
 #include "llvm/BinaryFormat/DynamicTags.def"
 #undef HEXAGON_DYNAMIC_TAG
     }
@@ -1585,18 +1571,18 @@ static const char *getTypeString(unsigne
   case EM_MIPS:
     switch (Type) {
 #define MIPS_DYNAMIC_TAG(name, value)                                          \
-    case DT_##name:                                                            \
-      return #name;
+  case DT_##name:                                                              \
+    return #name;
 #include "llvm/BinaryFormat/DynamicTags.def"
 #undef MIPS_DYNAMIC_TAG
     }
     break;
 
   case EM_PPC64:
-    switch(Type) {
+    switch (Type) {
 #define PPC64_DYNAMIC_TAG(name, value)                                         \
-    case DT_##name:                                                            \
-      return #name;
+  case DT_##name:                                                              \
+    return #name;
 #include "llvm/BinaryFormat/DynamicTags.def"
 #undef PPC64_DYNAMIC_TAG
     }
@@ -1619,68 +1605,66 @@ static const char *getTypeString(unsigne
 #undef HEXAGON_DYNAMIC_TAG
 #undef PPC64_DYNAMIC_TAG
 #undef DYNAMIC_TAG_MARKER
-  default: return "unknown";
+  default:
+    return "unknown";
   }
 }
 
-#define LLVM_READOBJ_DT_FLAG_ENT(prefix, enum) \
+#define LLVM_READOBJ_DT_FLAG_ENT(prefix, enum)                                 \
   { #enum, prefix##_##enum }
 
 static const EnumEntry<unsigned> ElfDynamicDTFlags[] = {
-  LLVM_READOBJ_DT_FLAG_ENT(DF, ORIGIN),
-  LLVM_READOBJ_DT_FLAG_ENT(DF, SYMBOLIC),
-  LLVM_READOBJ_DT_FLAG_ENT(DF, TEXTREL),
-  LLVM_READOBJ_DT_FLAG_ENT(DF, BIND_NOW),
-  LLVM_READOBJ_DT_FLAG_ENT(DF, STATIC_TLS)
-};
+    LLVM_READOBJ_DT_FLAG_ENT(DF, ORIGIN),
+    LLVM_READOBJ_DT_FLAG_ENT(DF, SYMBOLIC),
+    LLVM_READOBJ_DT_FLAG_ENT(DF, TEXTREL),
+    LLVM_READOBJ_DT_FLAG_ENT(DF, BIND_NOW),
+    LLVM_READOBJ_DT_FLAG_ENT(DF, STATIC_TLS)};
 
 static const EnumEntry<unsigned> ElfDynamicDTFlags1[] = {
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, NOW),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, GLOBAL),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, GROUP),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, NODELETE),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, LOADFLTR),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, INITFIRST),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, NOOPEN),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, ORIGIN),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, DIRECT),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, TRANS),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, INTERPOSE),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, NODEFLIB),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, NODUMP),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, CONFALT),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, ENDFILTEE),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, DISPRELDNE),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, DISPRELPND),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, NODIRECT),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, IGNMULDEF),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, NOKSYMS),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, NOHDR),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, EDITED),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, NORELOC),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, SYMINTPOSE),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, GLOBAUDIT),
-  LLVM_READOBJ_DT_FLAG_ENT(DF_1, SINGLETON)
-};
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, NOW),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, GLOBAL),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, GROUP),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, NODELETE),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, LOADFLTR),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, INITFIRST),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, NOOPEN),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, ORIGIN),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, DIRECT),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, TRANS),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, INTERPOSE),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, NODEFLIB),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, NODUMP),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, CONFALT),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, ENDFILTEE),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, DISPRELDNE),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, DISPRELPND),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, NODIRECT),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, IGNMULDEF),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, NOKSYMS),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, NOHDR),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, EDITED),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, NORELOC),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, SYMINTPOSE),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, GLOBAUDIT),
+    LLVM_READOBJ_DT_FLAG_ENT(DF_1, SINGLETON)};
 
 static const EnumEntry<unsigned> ElfDynamicDTMipsFlags[] = {
-  LLVM_READOBJ_DT_FLAG_ENT(RHF, NONE),
-  LLVM_READOBJ_DT_FLAG_ENT(RHF, QUICKSTART),
-  LLVM_READOBJ_DT_FLAG_ENT(RHF, NOTPOT),
-  LLVM_READOBJ_DT_FLAG_ENT(RHS, NO_LIBRARY_REPLACEMENT),
-  LLVM_READOBJ_DT_FLAG_ENT(RHF, NO_MOVE),
-  LLVM_READOBJ_DT_FLAG_ENT(RHF, SGI_ONLY),
-  LLVM_READOBJ_DT_FLAG_ENT(RHF, GUARANTEE_INIT),
-  LLVM_READOBJ_DT_FLAG_ENT(RHF, DELTA_C_PLUS_PLUS),
-  LLVM_READOBJ_DT_FLAG_ENT(RHF, GUARANTEE_START_INIT),
-  LLVM_READOBJ_DT_FLAG_ENT(RHF, PIXIE),
-  LLVM_READOBJ_DT_FLAG_ENT(RHF, DEFAULT_DELAY_LOAD),
-  LLVM_READOBJ_DT_FLAG_ENT(RHF, REQUICKSTART),
-  LLVM_READOBJ_DT_FLAG_ENT(RHF, REQUICKSTARTED),
-  LLVM_READOBJ_DT_FLAG_ENT(RHF, CORD),
-  LLVM_READOBJ_DT_FLAG_ENT(RHF, NO_UNRES_UNDEF),
-  LLVM_READOBJ_DT_FLAG_ENT(RHF, RLD_ORDER_SAFE)
-};
+    LLVM_READOBJ_DT_FLAG_ENT(RHF, NONE),
+    LLVM_READOBJ_DT_FLAG_ENT(RHF, QUICKSTART),
+    LLVM_READOBJ_DT_FLAG_ENT(RHF, NOTPOT),
+    LLVM_READOBJ_DT_FLAG_ENT(RHS, NO_LIBRARY_REPLACEMENT),
+    LLVM_READOBJ_DT_FLAG_ENT(RHF, NO_MOVE),
+    LLVM_READOBJ_DT_FLAG_ENT(RHF, SGI_ONLY),
+    LLVM_READOBJ_DT_FLAG_ENT(RHF, GUARANTEE_INIT),
+    LLVM_READOBJ_DT_FLAG_ENT(RHF, DELTA_C_PLUS_PLUS),
+    LLVM_READOBJ_DT_FLAG_ENT(RHF, GUARANTEE_START_INIT),
+    LLVM_READOBJ_DT_FLAG_ENT(RHF, PIXIE),
+    LLVM_READOBJ_DT_FLAG_ENT(RHF, DEFAULT_DELAY_LOAD),
+    LLVM_READOBJ_DT_FLAG_ENT(RHF, REQUICKSTART),
+    LLVM_READOBJ_DT_FLAG_ENT(RHF, REQUICKSTARTED),
+    LLVM_READOBJ_DT_FLAG_ENT(RHF, CORD),
+    LLVM_READOBJ_DT_FLAG_ENT(RHF, NO_UNRES_UNDEF),
+    LLVM_READOBJ_DT_FLAG_ENT(RHF, RLD_ORDER_SAFE)};
 
 #undef LLVM_READOBJ_DT_FLAG_ENT
 
@@ -1717,7 +1701,8 @@ static void printLibrary(raw_ostream &OS
 template <class ELFT>
 void ELFDumper<ELFT>::printValue(uint64_t Type, uint64_t Value) {
   raw_ostream &OS = W.getOStream();
-  const char* ConvChar = (opts::Output == opts::GNU) ? "0x%" PRIx64 : "0x%" PRIX64;
+  const char *ConvChar =
+      (opts::Output == opts::GNU) ? "0x%" PRIx64 : "0x%" PRIX64;
   switch (Type) {
   case DT_PLTREL:
     if (Value == DT_REL) {
@@ -1812,8 +1797,7 @@ void ELFDumper<ELFT>::printValue(uint64_
   }
 }
 
-template <class ELFT>
-void ELFDumper<ELFT>::printUnwindInfo() {
+template <class ELFT> void ELFDumper<ELFT>::printUnwindInfo() {
   DwarfCFIEH::PrinterContext<ELFT> Ctx(W, ObjF);
   Ctx.printUnwindInformation();
 }
@@ -1833,8 +1817,7 @@ template <> void ELFDumper<ELF32LE>::pri
 
 } // end anonymous namespace
 
-template <class ELFT>
-void ELFDumper<ELFT>::printDynamicTable() {
+template <class ELFT> void ELFDumper<ELFT>::printDynamicTable() {
   // A valid .dynamic section contains an array of entries terminated with
   // a DT_NULL entry. However, sometimes the section content may continue
   // past the DT_NULL entry, so to dump the section correctly, we first find
@@ -1852,14 +1835,19 @@ void ELFDumper<ELFT>::printDynamicTable(
   W.startLine() << "DynamicSection [ (" << Size << " entries)\n";
 
   bool Is64 = ELFT::Is64Bits;
-  W.startLine()
-     << "  Tag" << (Is64 ? "                " : "        ") << "Type"
-     << "                 " << "Name/Value\n";
+  W.startLine() << "  Tag" << (Is64 ? "                " : "        ") << "Type"
+                << "                 "
+                << "Name/Value\n";
   for (size_t I = 0; I < Size; ++I) {
     const Elf_Dyn &Entry = DynTableEntries[I];
     uintX_t Tag = Entry.getTag();
-    W.startLine() << "  " << format_hex(Tag, Is64 ? 18 : 10, opts::Output != opts::GNU) << " "
-                  << format("%-21s", getTypeString(ObjF->getELFFile()->getHeader()->e_machine, Tag));
+    W.startLine() << "  "
+                  << format_hex(Tag, Is64 ? 18 : 10, opts::Output != opts::GNU)
+                  << " "
+                  << format(
+                         "%-21s",
+                         getTypeString(
+                             ObjF->getELFFile()->getHeader()->e_machine, Tag));
     printValue(Tag, Entry.getVal());
     OS << "\n";
   }
@@ -1867,8 +1855,7 @@ void ELFDumper<ELFT>::printDynamicTable(
   W.startLine() << "]\n";
 }
 
-template <class ELFT>
-void ELFDumper<ELFT>::printNeededLibraries() {
+template <class ELFT> void ELFDumper<ELFT>::printNeededLibraries() {
   ListScope D(W, "NeededLibraries");
 
   using LibsTy = std::vector<StringRef>;
@@ -1881,12 +1868,10 @@ void ELFDumper<ELFT>::printNeededLibrari
   llvm::stable_sort(Libs);
 
   for (const auto &L : Libs)
-     W.startLine() << L << "\n";
+    W.startLine() << L << "\n";
 }
 
-
-template <typename ELFT>
-void ELFDumper<ELFT>::printHashTable() {
+template <typename ELFT> void ELFDumper<ELFT>::printHashTable() {
   DictScope D(W, "HashTable");
   if (!HashTable)
     return;
@@ -1896,8 +1881,7 @@ void ELFDumper<ELFT>::printHashTable() {
   W.printList("Chains", HashTable->chains());
 }
 
-template <typename ELFT>
-void ELFDumper<ELFT>::printGnuHashTable() {
+template <typename ELFT> void ELFDumper<ELFT>::printGnuHashTable() {
   DictScope D(W, "GnuHashTable");
   if (!GnuHashTable)
     return;
@@ -1918,8 +1902,7 @@ template <typename ELFT> void ELFDumper<
   W.printString("LoadName", SOName);
 }
 
-template <class ELFT>
-void ELFDumper<ELFT>::printAttributes() {
+template <class ELFT> void ELFDumper<ELFT>::printAttributes() {
   W.startLine() << "Attributes not implemented.\n";
 }
 
@@ -1959,7 +1942,7 @@ public:
   using Entries = ArrayRef<Entry>;
 
   const bool IsStatic;
-  const ELFO * const Obj;
+  const ELFO *const Obj;
 
   MipsGOTParser(const ELFO *Obj, Elf_Dyn_Range DynTable, Elf_Sym_Range DynSyms);
 
@@ -1978,11 +1961,11 @@ public:
   Entries getOtherEntries() const;
   Entries getPltEntries() const;
 
-  uint64_t getGotAddress(const Entry * E) const;
-  int64_t getGotOffset(const Entry * E) const;
+  uint64_t getGotAddress(const Entry *E) const;
+  int64_t getGotOffset(const Entry *E) const;
   const Elf_Sym *getGotSym(const Entry *E) const;
 
-  uint64_t getPltAddress(const Entry * E) const;
+  uint64_t getPltAddress(const Entry *E) const;
   const Elf_Sym *getPltSym(const Entry *E) const;
 
   StringRef getPltStrTable() const { return PltStrTable; }
@@ -2224,61 +2207,59 @@ template <class ELFT> void ELFDumper<ELF
 }
 
 static const EnumEntry<unsigned> ElfMipsISAExtType[] = {
-  {"None",                    Mips::AFL_EXT_NONE},
-  {"Broadcom SB-1",           Mips::AFL_EXT_SB1},
-  {"Cavium Networks Octeon",  Mips::AFL_EXT_OCTEON},
-  {"Cavium Networks Octeon2", Mips::AFL_EXT_OCTEON2},
-  {"Cavium Networks OcteonP", Mips::AFL_EXT_OCTEONP},
-  {"Cavium Networks Octeon3", Mips::AFL_EXT_OCTEON3},
-  {"LSI R4010",               Mips::AFL_EXT_4010},
-  {"Loongson 2E",             Mips::AFL_EXT_LOONGSON_2E},
-  {"Loongson 2F",             Mips::AFL_EXT_LOONGSON_2F},
-  {"Loongson 3A",             Mips::AFL_EXT_LOONGSON_3A},
-  {"MIPS R4650",              Mips::AFL_EXT_4650},
-  {"MIPS R5900",              Mips::AFL_EXT_5900},
-  {"MIPS R10000",             Mips::AFL_EXT_10000},
-  {"NEC VR4100",              Mips::AFL_EXT_4100},
-  {"NEC VR4111/VR4181",       Mips::AFL_EXT_4111},
-  {"NEC VR4120",              Mips::AFL_EXT_4120},
-  {"NEC VR5400",              Mips::AFL_EXT_5400},
-  {"NEC VR5500",              Mips::AFL_EXT_5500},
-  {"RMI Xlr",                 Mips::AFL_EXT_XLR},
-  {"Toshiba R3900",           Mips::AFL_EXT_3900}
-};
+    {"None", Mips::AFL_EXT_NONE},
+    {"Broadcom SB-1", Mips::AFL_EXT_SB1},
+    {"Cavium Networks Octeon", Mips::AFL_EXT_OCTEON},
+    {"Cavium Networks Octeon2", Mips::AFL_EXT_OCTEON2},
+    {"Cavium Networks OcteonP", Mips::AFL_EXT_OCTEONP},
+    {"Cavium Networks Octeon3", Mips::AFL_EXT_OCTEON3},
+    {"LSI R4010", Mips::AFL_EXT_4010},
+    {"Loongson 2E", Mips::AFL_EXT_LOONGSON_2E},
+    {"Loongson 2F", Mips::AFL_EXT_LOONGSON_2F},
+    {"Loongson 3A", Mips::AFL_EXT_LOONGSON_3A},
+    {"MIPS R4650", Mips::AFL_EXT_4650},
+    {"MIPS R5900", Mips::AFL_EXT_5900},
+    {"MIPS R10000", Mips::AFL_EXT_10000},
+    {"NEC VR4100", Mips::AFL_EXT_4100},
+    {"NEC VR4111/VR4181", Mips::AFL_EXT_4111},
+    {"NEC VR4120", Mips::AFL_EXT_4120},
+    {"NEC VR5400", Mips::AFL_EXT_5400},
+    {"NEC VR5500", Mips::AFL_EXT_5500},
+    {"RMI Xlr", Mips::AFL_EXT_XLR},
+    {"Toshiba R3900", Mips::AFL_EXT_3900}};
 
 static const EnumEntry<unsigned> ElfMipsASEFlags[] = {
-  {"DSP",                Mips::AFL_ASE_DSP},
-  {"DSPR2",              Mips::AFL_ASE_DSPR2},
-  {"Enhanced VA Scheme", Mips::AFL_ASE_EVA},
-  {"MCU",                Mips::AFL_ASE_MCU},
-  {"MDMX",               Mips::AFL_ASE_MDMX},
-  {"MIPS-3D",            Mips::AFL_ASE_MIPS3D},
-  {"MT",                 Mips::AFL_ASE_MT},
-  {"SmartMIPS",          Mips::AFL_ASE_SMARTMIPS},
-  {"VZ",                 Mips::AFL_ASE_VIRT},
-  {"MSA",                Mips::AFL_ASE_MSA},
-  {"MIPS16",             Mips::AFL_ASE_MIPS16},
-  {"microMIPS",          Mips::AFL_ASE_MICROMIPS},
-  {"XPA",                Mips::AFL_ASE_XPA},
-  {"CRC",                Mips::AFL_ASE_CRC},
-  {"GINV",               Mips::AFL_ASE_GINV},
+    {"DSP", Mips::AFL_ASE_DSP},
+    {"DSPR2", Mips::AFL_ASE_DSPR2},
+    {"Enhanced VA Scheme", Mips::AFL_ASE_EVA},
+    {"MCU", Mips::AFL_ASE_MCU},
+    {"MDMX", Mips::AFL_ASE_MDMX},
+    {"MIPS-3D", Mips::AFL_ASE_MIPS3D},
+    {"MT", Mips::AFL_ASE_MT},
+    {"SmartMIPS", Mips::AFL_ASE_SMARTMIPS},
+    {"VZ", Mips::AFL_ASE_VIRT},
+    {"MSA", Mips::AFL_ASE_MSA},
+    {"MIPS16", Mips::AFL_ASE_MIPS16},
+    {"microMIPS", Mips::AFL_ASE_MICROMIPS},
+    {"XPA", Mips::AFL_ASE_XPA},
+    {"CRC", Mips::AFL_ASE_CRC},
+    {"GINV", Mips::AFL_ASE_GINV},
 };
 
 static const EnumEntry<unsigned> ElfMipsFpABIType[] = {
-  {"Hard or soft float",                  Mips::Val_GNU_MIPS_ABI_FP_ANY},
-  {"Hard float (double precision)",       Mips::Val_GNU_MIPS_ABI_FP_DOUBLE},
-  {"Hard float (single precision)",       Mips::Val_GNU_MIPS_ABI_FP_SINGLE},
-  {"Soft float",                          Mips::Val_GNU_MIPS_ABI_FP_SOFT},
-  {"Hard float (MIPS32r2 64-bit FPU 12 callee-saved)",
-   Mips::Val_GNU_MIPS_ABI_FP_OLD_64},
-  {"Hard float (32-bit CPU, Any FPU)",    Mips::Val_GNU_MIPS_ABI_FP_XX},
-  {"Hard float (32-bit CPU, 64-bit FPU)", Mips::Val_GNU_MIPS_ABI_FP_64},
-  {"Hard float compat (32-bit CPU, 64-bit FPU)",
-   Mips::Val_GNU_MIPS_ABI_FP_64A}
-};
+    {"Hard or soft float", Mips::Val_GNU_MIPS_ABI_FP_ANY},
+    {"Hard float (double precision)", Mips::Val_GNU_MIPS_ABI_FP_DOUBLE},
+    {"Hard float (single precision)", Mips::Val_GNU_MIPS_ABI_FP_SINGLE},
+    {"Soft float", Mips::Val_GNU_MIPS_ABI_FP_SOFT},
+    {"Hard float (MIPS32r2 64-bit FPU 12 callee-saved)",
+     Mips::Val_GNU_MIPS_ABI_FP_OLD_64},
+    {"Hard float (32-bit CPU, Any FPU)", Mips::Val_GNU_MIPS_ABI_FP_XX},
+    {"Hard float (32-bit CPU, 64-bit FPU)", Mips::Val_GNU_MIPS_ABI_FP_64},
+    {"Hard float compat (32-bit CPU, 64-bit FPU)",
+     Mips::Val_GNU_MIPS_ABI_FP_64A}};
 
-static const EnumEntry<unsigned> ElfMipsFlags1[] {
-  {"ODDSPREG", Mips::AFL_FLAGS1_ODDSPREG},
+static const EnumEntry<unsigned> ElfMipsFlags1[]{
+    {"ODDSPREG", Mips::AFL_FLAGS1_ODDSPREG},
 };
 
 static int getMipsRegisterSize(uint8_t Flag) {
@@ -2449,7 +2430,8 @@ static std::string getSectionHeaderTable
   ArrayRef<typename ELFT::Shdr> Arr = unwrapOrError(Obj->sections());
   if (Arr.empty())
     return "65535 (corrupt: out of range)";
-  return to_string(ElfHeader->e_shstrndx) + " (" + to_string(Arr[0].sh_link) + ")";
+  return to_string(ElfHeader->e_shstrndx) + " (" + to_string(Arr[0].sh_link) +
+         ")";
 }
 
 template <class ELFT> void GNUStyle<ELFT>::printFileHeaders(const ELFO *Obj) {
@@ -2690,10 +2672,8 @@ template <class ELFT> void GNUStyle<ELFT
 template <class ELFT> void GNUStyle<ELFT>::printRelocations(const ELFO *Obj) {
   bool HasRelocSections = false;
   for (const Elf_Shdr &Sec : unwrapOrError(Obj->sections())) {
-    if (Sec.sh_type != ELF::SHT_REL &&
-        Sec.sh_type != ELF::SHT_RELA &&
-        Sec.sh_type != ELF::SHT_RELR &&
-        Sec.sh_type != ELF::SHT_ANDROID_REL &&
+    if (Sec.sh_type != ELF::SHT_REL && Sec.sh_type != ELF::SHT_RELA &&
+        Sec.sh_type != ELF::SHT_RELR && Sec.sh_type != ELF::SHT_ANDROID_REL &&
         Sec.sh_type != ELF::SHT_ANDROID_RELA &&
         Sec.sh_type != ELF::SHT_ANDROID_RELR)
       continue;
@@ -3158,8 +3138,8 @@ bool GNUStyle<ELFT>::checkoffsets(const
       (IsSpecial && Phdr.p_type != ELF::PT_TLS) ? 0 : Sec.sh_size;
   if (Sec.sh_offset >= Phdr.p_offset)
     return ((Sec.sh_offset + SectionSize <= Phdr.p_filesz + Phdr.p_offset)
-            /*only non-zero sized sections at end*/ &&
-            (Sec.sh_offset + 1 <= Phdr.p_offset + Phdr.p_filesz));
+            /*only non-zero sized sections at end*/
+            && (Sec.sh_offset + 1 <= Phdr.p_offset + Phdr.p_filesz));
   return false;
 }
 
@@ -3305,7 +3285,8 @@ void GNUStyle<ELFT>::printDynamicRelocat
     OS << "\n'RELA' relocation section at offset "
        << format_hex(reinterpret_cast<const uint8_t *>(DynRelaRegion.Addr) -
                          Obj->base(),
-                     1) << " contains " << DynRelaRegion.Size << " bytes:\n";
+                     1)
+       << " contains " << DynRelaRegion.Size << " bytes:\n";
     printRelocHeader(ELF::SHT_RELA);
     for (const Elf_Rela &Rela : this->dumper()->dyn_relas())
       printDynamicRelocation(Obj, Rela, true);
@@ -3314,7 +3295,8 @@ void GNUStyle<ELFT>::printDynamicRelocat
     OS << "\n'REL' relocation section at offset "
        << format_hex(reinterpret_cast<const uint8_t *>(DynRelRegion.Addr) -
                          Obj->base(),
-                     1) << " contains " << DynRelRegion.Size << " bytes:\n";
+                     1)
+       << " contains " << DynRelRegion.Size << " bytes:\n";
     printRelocHeader(ELF::SHT_REL);
     for (const Elf_Rel &Rel : this->dumper()->dyn_rels()) {
       Elf_Rela Rela;
@@ -3328,7 +3310,8 @@ void GNUStyle<ELFT>::printDynamicRelocat
     OS << "\n'RELR' relocation section at offset "
        << format_hex(reinterpret_cast<const uint8_t *>(DynRelrRegion.Addr) -
                          Obj->base(),
-                     1) << " contains " << DynRelrRegion.Size << " bytes:\n";
+                     1)
+       << " contains " << DynRelrRegion.Size << " bytes:\n";
     printRelocHeader(ELF::SHT_REL);
     Elf_Relr_Range Relrs = this->dumper()->dyn_relrs();
     std::vector<Elf_Rela> RelrRelas = unwrapOrError(Obj->decode_relrs(Relrs));
@@ -3340,7 +3323,8 @@ void GNUStyle<ELFT>::printDynamicRelocat
     OS << "\n'PLT' relocation section at offset "
        << format_hex(reinterpret_cast<const uint8_t *>(DynPLTRelRegion.Addr) -
                          Obj->base(),
-                     1) << " contains " << DynPLTRelRegion.Size << " bytes:\n";
+                     1)
+       << " contains " << DynPLTRelRegion.Size << " bytes:\n";
   }
   if (DynPLTRelRegion.EntSize == sizeof(Elf_Rela)) {
     printRelocHeader(ELF::SHT_RELA);
@@ -3471,7 +3455,7 @@ void GNUStyle<ELFT>::printHashHistogram(
     if (!TotalSyms)
       return;
 
-    std::vector<size_t> Count(MaxChain, 0) ;
+    std::vector<size_t> Count(MaxChain, 0);
     // Count how long is the chain for each bucket
     for (size_t B = 0; B < NBucket; B++)
       ++Count[ChainLen[B]];
@@ -3522,7 +3506,7 @@ void GNUStyle<ELFT>::printHashHistogram(
     if (!TotalSyms)
       return;
 
-    std::vector<size_t> Count(MaxChain, 0) ;
+    std::vector<size_t> Count(MaxChain, 0);
     for (size_t B = 0; B < NBucket; B++)
       ++Count[ChainLen[B]];
     // Print Number of buckets with each chain lengths and their cumulative
@@ -3530,7 +3514,7 @@ void GNUStyle<ELFT>::printHashHistogram(
     OS << "Histogram for `.gnu.hash' bucket list length (total of " << NBucket
        << " buckets)\n"
        << " Length  Number     % of total  Coverage\n";
-    for (size_t I = 0; I <MaxChain; I++) {
+    for (size_t I = 0; I < MaxChain; I++) {
       CumulativeNonZero += Count[I] * I;
       OS << format("%7lu  %-10lu (%5.1f%%)     %5.1f%%\n", I, Count[I],
                    (Count[I] * 100.0) / NBucket,
@@ -3546,7 +3530,7 @@ void GNUStyle<ELFT>::printCGProfile(cons
 
 template <class ELFT>
 void GNUStyle<ELFT>::printAddrsig(const ELFFile<ELFT> *Obj) {
-    OS << "GNUStyle::printAddrsig not implemented\n";
+  OS << "GNUStyle::printAddrsig not implemented\n";
 }
 
 static StringRef getGenericNoteTypeName(const uint32_t NT) {
@@ -3621,14 +3605,11 @@ static std::string getAMDNoteTypeName(co
   static const struct {
     uint32_t ID;
     const char *Name;
-  } Notes[] = {
-    {ELF::NT_AMD_AMDGPU_HSA_METADATA,
-     "NT_AMD_AMDGPU_HSA_METADATA (HSA Metadata)"},
-    {ELF::NT_AMD_AMDGPU_ISA,
-     "NT_AMD_AMDGPU_ISA (ISA Version)"},
-    {ELF::NT_AMD_AMDGPU_PAL_METADATA,
-     "NT_AMD_AMDGPU_PAL_METADATA (PAL Metadata)"}
-  };
+  } Notes[] = {{ELF::NT_AMD_AMDGPU_HSA_METADATA,
+                "NT_AMD_AMDGPU_HSA_METADATA (HSA Metadata)"},
+               {ELF::NT_AMD_AMDGPU_ISA, "NT_AMD_AMDGPU_ISA (ISA Version)"},
+               {ELF::NT_AMD_AMDGPU_PAL_METADATA,
+                "NT_AMD_AMDGPU_PAL_METADATA (PAL Metadata)"}};
 
   for (const auto &Note : Notes)
     if (Note.ID == NT)
@@ -3770,8 +3751,7 @@ static std::string getGNUProperty(uint32
 }
 
 template <typename ELFT>
-static SmallVector<std::string, 4>
-getGNUPropertyList(ArrayRef<uint8_t> Arr) {
+static SmallVector<std::string, 4> getGNUPropertyList(ArrayRef<uint8_t> Arr) {
   using Elf_Word = typename ELFT::Word;
 
   SmallVector<std::string, 4> Properties;
@@ -3806,12 +3786,11 @@ struct GNUAbiTag {
   bool IsValid;
 };
 
-template <typename ELFT>
-static GNUAbiTag getGNUAbiTag(ArrayRef<uint8_t> Desc) {
+template <typename ELFT> static GNUAbiTag getGNUAbiTag(ArrayRef<uint8_t> Desc) {
   typedef typename ELFT::Word Elf_Word;
 
-  ArrayRef<Elf_Word> Words(reinterpret_cast<const Elf_Word*>(Desc.begin()),
-                           reinterpret_cast<const Elf_Word*>(Desc.end()));
+  ArrayRef<Elf_Word> Words(reinterpret_cast<const Elf_Word *>(Desc.begin()),
+                           reinterpret_cast<const Elf_Word *>(Desc.end()));
 
   if (Words.size() < 4)
     return {"", "", /*IsValid=*/false};
@@ -3882,13 +3861,13 @@ static AMDNote getAMDNote(uint32_t NoteT
   default:
     return {"", ""};
   case ELF::NT_AMD_AMDGPU_HSA_METADATA:
-    return {"HSA Metadata",
-            std::string(reinterpret_cast<const char *>(Desc.data()),
-                        Desc.size())};
+    return {
+        "HSA Metadata",
+        std::string(reinterpret_cast<const char *>(Desc.data()), Desc.size())};
   case ELF::NT_AMD_AMDGPU_ISA:
-    return {"ISA Version",
-            std::string(reinterpret_cast<const char *>(Desc.data()),
-                        Desc.size())};
+    return {
+        "ISA Version",
+        std::string(reinterpret_cast<const char *>(Desc.data()), Desc.size())};
   }
 }
 
@@ -4161,7 +4140,8 @@ template <class ELFT> void LLVMStyle<ELF
     W.printNumber("ProgramHeaderCount", E->e_phnum);
     W.printNumber("SectionHeaderEntrySize", E->e_shentsize);
     W.printString("SectionHeaderCount", getSectionHeadersNumString(Obj));
-    W.printString("StringTableSectionIndex", getSectionHeaderTableIndexString(Obj));
+    W.printString("StringTableSectionIndex",
+                  getSectionHeaderTableIndexString(Obj));
   }
 }
 
@@ -4206,10 +4186,8 @@ template <class ELFT> void LLVMStyle<ELF
   for (const Elf_Shdr &Sec : unwrapOrError(Obj->sections())) {
     ++SectionNumber;
 
-    if (Sec.sh_type != ELF::SHT_REL &&
-        Sec.sh_type != ELF::SHT_RELA &&
-        Sec.sh_type != ELF::SHT_RELR &&
-        Sec.sh_type != ELF::SHT_ANDROID_REL &&
+    if (Sec.sh_type != ELF::SHT_REL && Sec.sh_type != ELF::SHT_RELA &&
+        Sec.sh_type != ELF::SHT_RELR && Sec.sh_type != ELF::SHT_ANDROID_REL &&
         Sec.sh_type != ELF::SHT_ANDROID_RELA &&
         Sec.sh_type != ELF::SHT_ANDROID_RELR)
       continue;
@@ -4292,8 +4270,8 @@ void LLVMStyle<ELFT>::printRelocation(co
   } else {
     raw_ostream &OS = W.startLine();
     OS << W.hex(Rel.r_offset) << " " << RelocName << " "
-       << (!TargetName.empty() ? TargetName : "-") << " "
-       << W.hex(Rel.r_addend) << "\n";
+       << (!TargetName.empty() ? TargetName : "-") << " " << W.hex(Rel.r_addend)
+       << "\n";
   }
 }
 
@@ -4505,8 +4483,8 @@ void LLVMStyle<ELFT>::printDynamicReloca
   } else {
     raw_ostream &OS = W.startLine();
     OS << W.hex(Rel.r_offset) << " " << RelocName << " "
-       << (!SymbolName.empty() ? SymbolName : "-") << " "
-       << W.hex(Rel.r_addend) << "\n";
+       << (!SymbolName.empty() ? SymbolName : "-") << " " << W.hex(Rel.r_addend)
+       << "\n";
   }
 }
 
@@ -4703,8 +4681,7 @@ void LLVMStyle<ELFT>::printAddrsig(const
 }
 
 template <typename ELFT>
-static void printGNUNoteLLVMStyle(uint32_t NoteType,
-                                  ArrayRef<uint8_t> Desc,
+static void printGNUNoteLLVMStyle(uint32_t NoteType, ArrayRef<uint8_t> Desc,
                                   ScopedPrinter &W) {
   switch (NoteType) {
   default:
@@ -4813,7 +4790,7 @@ void LLVMStyle<ELFT>::printELFLinkerOpti
       continue;
 
     ArrayRef<uint8_t> Contents = unwrapOrError(Obj->getSectionContents(&Shdr));
-    for (const uint8_t *P = Contents.begin(), *E = Contents.end(); P < E; ) {
+    for (const uint8_t *P = Contents.begin(), *E = Contents.end(); P < E;) {
       StringRef Key = StringRef(reinterpret_cast<const char *>(P));
       StringRef Value =
           StringRef(reinterpret_cast<const char *>(P) + Key.size() + 1);




More information about the llvm-commits mailing list