mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:39:47 +00:00
Simplify the code. No functionality change.
llvm-svn: 179259
This commit is contained in:
parent
3ac0776aa4
commit
09d9620af5
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user