Use generic CPU types instead of hard coding to mach-o when getting default byte order (patch from Stephen Wilson).

llvm-svn: 123781
This commit is contained in:
Greg Clayton 2011-01-18 21:47:52 +00:00
parent 411c0ce87c
commit 8368b4b2a2
1 changed files with 6 additions and 6 deletions

View File

@ -1807,15 +1807,15 @@ ArchSpec::SetCPUSubtype (uint32_t subtype)
ByteOrder
ArchSpec::GetDefaultEndian () const
{
switch (m_cpu)
switch (GetGenericCPUType ())
{
case llvm::MachO::CPUTypePowerPC:
case llvm::MachO::CPUTypePowerPC64:
case eCPU_ppc:
case eCPU_ppc64:
return eByteOrderBig;
case llvm::MachO::CPUTypeARM:
case llvm::MachO::CPUTypeI386:
case llvm::MachO::CPUTypeX86_64:
case eCPU_arm:
case eCPU_i386:
case eCPU_x86_64:
return eByteOrderLittle;
default: