[llvm] r179259 - Simplify the code. No functionality change.
Rafael Espindola
rafael.espindola at gmail.com
Wed Apr 10 20:34:38 PDT 2013
Author: rafael
Date: Wed Apr 10 22:34:37 2013
New Revision: 179259
URL: http://llvm.org/viewvc/llvm-project?rev=179259&view=rev
Log:
Simplify the code. No functionality change.
Modified:
llvm/trunk/tools/llvm-objdump/MachODump.cpp
Modified: llvm/trunk/tools/llvm-objdump/MachODump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/MachODump.cpp?rev=179259&r1=179258&r2=179259&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/MachODump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/MachODump.cpp Wed Apr 10 22:34:37 2013
@@ -56,23 +56,7 @@ static const Target *GetTarget(const Mac
// 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();
}
More information about the llvm-commits
mailing list