Modified version of Marco Minutoli's host arch patch.

llvm-svn: 125706
This commit is contained in:
Greg Clayton 2011-02-17 02:05:38 +00:00
parent ffda452fbf
commit 4796c4feb1
1 changed files with 8 additions and 14 deletions

View File

@ -294,37 +294,31 @@ Host::GetArchitecture (SystemDefaultArchitecture arch_kind)
#if defined (__x86_64__) #if defined (__x86_64__)
g_host_arch_64.SetArch ("x86_64"); g_host_arch_64.SetArch ("x86_64");
g_supports_32 = false;
g_supports_64 = true;
#elif defined (__i386__) #elif defined (__i386__)
g_host_arch.SetArch ("i386"); g_host_arch_32.SetArch ("i386");
g_supports_32 = true;
g_supports_64 = false;
#elif defined (__arm__) #elif defined (__arm__)
g_host_arch.SetArch ("arm"); g_host_arch_32.SetArch ("arm");
g_supports_32 = true;
g_supports_64 = false;
#elif defined (__ppc64__) #elif defined (__ppc64__)
g_host_arch.SetArch ("ppc64"); g_host_arch_64.SetArch ("ppc64");
g_supports_32 = false;
g_supports_64 = true;
#elif defined (__powerpc__) || defined (__ppc__) #elif defined (__powerpc__) || defined (__ppc__)
g_host_arch.SetArch ("ppc");
g_supports_32 = true; g_host_arch_32.SetArch ("ppc");
g_supports_64 = false;
#else #else
#error undefined architecture, define your architecture here #error undefined architecture, define your architecture here
#endif #endif
g_supports_32 = g_host_arch_32.IsValid();
g_supports_64 = g_host_arch_64.IsValid();
} }
#endif // #else for #if defined (__APPLE__) #endif // #else for #if defined (__APPLE__)