[PATCH] D74433: [llvm-objdump] Print file format in lowercase to match GNU output.

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 11 13:27:49 PST 2020


MaskRay added a subscriber: grimar.
MaskRay added a comment.

Wait. I wonder whether we can change llvm-readobj to use lower case names as well. The following should be updated:

  StringRef ELFObjectFile<ELFT>::getFileFormatName() const {
    bool IsLittleEndian = ELFT::TargetEndianness == support::little;
    switch (EF.getHeader()->e_ident[ELF::EI_CLASS]) {
    case ELF::ELFCLASS32:
      switch (EF.getHeader()->e_machine) {
      case ELF::EM_386:
        return "ELF32-i386";
      case ELF::EM_IAMCU:
        return "ELF32-iamcu";
      case ELF::EM_X86_64:
        return "ELF32-x86-64";
      case ELF::EM_ARM:

I vote for changing these `ELF` to `elf`. @jhenderson  @grimar thoughts?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74433/new/

https://reviews.llvm.org/D74433





More information about the cfe-commits mailing list