Resolve the executable _before_ we try to get the module specifications.

Also fixed the host 32 and 64 bit arch to return "x86_64-apple-macosx" again instead of "x86_64-apple-" (unspecified OS) after recent changes.

<rdar://problem/17845078> 

llvm-svn: 214223
diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp
index 32a1a08..df1c787 100644
--- a/lldb/source/Host/common/Host.cpp
+++ b/lldb/source/Host/common/Host.cpp
@@ -379,6 +379,17 @@
                     cpusubtype32 = CPU_SUBTYPE_ARM_V7S;
 #endif
                 g_host_arch_32.SetArchitecture (eArchTypeMachO, cputype & ~(CPU_ARCH_MASK), cpusubtype32);
+                
+                if (cputype == CPU_TYPE_ARM || cputype == CPU_TYPE_ARM64)
+                {
+                    g_host_arch_32.GetTriple().setOS(llvm::Triple::IOS);
+                    g_host_arch_64.GetTriple().setOS(llvm::Triple::IOS);
+                }
+                else
+                {
+                    g_host_arch_32.GetTriple().setOS(llvm::Triple::MacOSX);
+                    g_host_arch_64.GetTriple().setOS(llvm::Triple::MacOSX);
+                }
             }
             else
             {