summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorIvan Krasin <krasin@chromium.org>2017-01-13 16:45:15 +0000
committerIvan Krasin <krasin@chromium.org>2017-01-13 16:45:15 +0000
commit1ed7896c1b656276bc3b495ecbca3096dd5781ab (patch)
tree620385ecb80c4e685d518dc2f1cabecb61f2fc3c /llvm/tools/llvm-objdump/llvm-objdump.cpp
parente4bbd88116c5600bffe65b4ce295d2aa57b1e1df (diff)
downloadbcm5719-llvm-1ed7896c1b656276bc3b495ecbca3096dd5781ab.tar.gz
bcm5719-llvm-1ed7896c1b656276bc3b495ecbca3096dd5781ab.zip
Revert r291903 and r291898. Reason: they break check-lld on the bots.
Summary: Revert [ARM] Fix ubig32_t read in ARMAttributeParser Now using support functions to read data instead of trying to perform casts. =========================================================== Revert [ARM] Enable objdump to construct triple for ARM Now that The ARMAttributeParser has been moved into the library, it has been modified so that it can parse the attributes without printing them and stores them in a map. ELFObjectFile now queries the attributes to fill out the architecture details of a provided triple for 'arm' and 'thumb' targets. llvm-objdump uses this new functionality. Subscribers: llvm-commits, samparker, aemerson, mgorny Differential Revision: https://reviews.llvm.org/D28683 llvm-svn: 291911
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
-rw-r--r--llvm/tools/llvm-objdump/llvm-objdump.cpp21
1 files changed, 2 insertions, 19 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;
OpenPOWER on IntegriCloud