diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-11 03:34:37 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-11 03:34:37 +0000 |
commit | 317d3f48fd53be5238dfba5e9fbac51a2366de0e (patch) | |
tree | 82db2de5d520186be1ab797a7affd7048dff622a /tools | |
parent | fb1b6fddbe3f84c0454dd42134741a33042dadf3 (diff) |
Simplify the code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179259 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llvm-objdump/MachODump.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/tools/llvm-objdump/MachODump.cpp b/tools/llvm-objdump/MachODump.cpp index d1e7d695f6..89847d0499 100644 --- a/tools/llvm-objdump/MachODump.cpp +++ b/tools/llvm-objdump/MachODump.cpp @@ -56,23 +56,7 @@ static const Target *GetTarget(const MachOObjectFileBase *MachOObj) { // Figure out the target triple. if (TripleName.empty()) { llvm::Triple TT("unknown-unknown-unknown"); - switch (MachOObj->getHeader()->CPUType) { - case llvm::MachO::CPUTypeI386: - TT.setArch(Triple::ArchType(Triple::x86)); - break; - case llvm::MachO::CPUTypeX86_64: - TT.setArch(Triple::ArchType(Triple::x86_64)); - break; - case llvm::MachO::CPUTypeARM: - TT.setArch(Triple::ArchType(Triple::arm)); - break; - case llvm::MachO::CPUTypePowerPC: - TT.setArch(Triple::ArchType(Triple::ppc)); - break; - case llvm::MachO::CPUTypePowerPC64: - TT.setArch(Triple::ArchType(Triple::ppc64)); - break; - } + TT.setArch(Triple::ArchType(MachOObj->getArch())); TripleName = TT.str(); } |