aboutsummaryrefslogtreecommitdiff
path: root/src/common/mac/macho_walker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/mac/macho_walker.cc')
-rw-r--r--src/common/mac/macho_walker.cc17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/common/mac/macho_walker.cc b/src/common/mac/macho_walker.cc
index 4e1d9f16..ecea8997 100644
--- a/src/common/mac/macho_walker.cc
+++ b/src/common/mac/macho_walker.cc
@@ -62,22 +62,11 @@ MachoWalker::~MachoWalker() {
}
int MachoWalker::ValidateCPUType(int cpu_type) {
- // If the user didn't specify, try to use the local architecture. If that
- // fails, use the base type for the executable.
+ // If the user didn't specify, use the local architecture.
if (cpu_type == 0) {
const NXArchInfo *arch = NXGetLocalArchInfo();
- if (arch)
- cpu_type = arch->cputype;
- else
-#if __ppc__
- cpu_type = CPU_TYPE_POWERPC;
-#elif __i386__
- cpu_type = CPU_TYPE_X86;
-#elif __x86_64__
- cpu_type = CPU_TYPE_X86_64;
-#else
-#error Unknown architecture -- are you on a PDP-11?
-#endif
+ assert(arch);
+ cpu_type = arch->cputype;
}
return cpu_type;