1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

Simplify the code. No functionality change.

llvm-svn: 179259
This commit is contained in:
Rafael Espindola 2013-04-11 03:34:37 +00:00
parent 3ac0776aa4
commit 09d9620af5

View File

@ -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();
}