diff options
Diffstat (limited to 'llvm/tools')
-rw-r--r-- | llvm/tools/llvm-objdump/llvm-objdump.cpp | 21 | ||||
-rw-r--r-- | llvm/tools/llvm-readobj/ELFDumper.cpp | 2 |
2 files changed, 3 insertions, 20 deletions
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp index 6b8a43ea1bd..8373f0ce3f1 100644 --- a/llvm/tools/llvm-objdump/llvm-objdump.cpp +++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp @@ -357,16 +357,7 @@ static const Target *getTarget(const ObjectFile *Obj = nullptr) { llvm::Triple TheTriple("unknown-unknown-unknown"); if (TripleName.empty()) { if (Obj) { - auto Arch = Obj->getArch(); - TheTriple.setArch(Triple::ArchType(Arch)); - - // For ARM targets, try to use the build attributes to build determine - // the build target. Target features are also added, but later during - // disassembly. - if (Arch == Triple::arm || Arch == Triple::armeb) { - Obj->setARMSubArch(TheTriple); - } - + TheTriple.setArch(Triple::ArchType(Obj->getArch())); // TheTriple defaults to ELF, and COFF doesn't have an environment: // the best we can do here is indicate that it is mach-o. if (Obj->isMachO()) @@ -378,16 +369,8 @@ static const Target *getTarget(const ObjectFile *Obj = nullptr) { TheTriple.setTriple("thumbv7-windows"); } } - } else { + } else TheTriple.setTriple(Triple::normalize(TripleName)); - // Use the triple, but also try to combine with ARM build attributes. - if (Obj) { - auto Arch = Obj->getArch(); - if (Arch == Triple::arm || Arch == Triple::armeb) { - Obj->setARMSubArch(TheTriple); - } - } - } // Get the target specific parser. std::string Error; diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp index 0a3cd7a4f62..54ef7fbdd30 100644 --- a/llvm/tools/llvm-readobj/ELFDumper.cpp +++ b/llvm/tools/llvm-readobj/ELFDumper.cpp @@ -1892,7 +1892,7 @@ template <> void ELFDumper<ELFType<support::little, false>>::printAttributes() { if (Contents.size() == 1) continue; - ARMAttributeParser(&W).Parse(Contents, true); + ARMAttributeParser(W).Parse(Contents); } } } |