summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Platform/MacOSX
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2014-08-20 16:42:51 +0000
committerZachary Turner <zturner@google.com>2014-08-20 16:42:51 +0000
commit13b1826104584b362e83d15bc72799b03f28ebd2 (patch)
treee09615a35919f90f56022dd1f717af060bfb2620 /lldb/source/Plugins/Platform/MacOSX
parente1bb055ed393eac50ef19541d240d4cee46b06fa (diff)
downloadbcm5719-llvm-13b1826104584b362e83d15bc72799b03f28ebd2.tar.gz
bcm5719-llvm-13b1826104584b362e83d15bc72799b03f28ebd2.zip
Move Host::GetArchitecture to HostInfo::GetArchitecture.
As a side effect, this patch also eliminates all of the preprocessor conditionals previously used to implement GetArchitecture(). llvm-svn: 216074
Diffstat (limited to 'lldb/source/Plugins/Platform/MacOSX')
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp13
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp2
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp7
3 files changed, 12 insertions, 10 deletions
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
index 71740c16356..8f7582b1e3c 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
@@ -23,6 +23,7 @@
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Core/Timer.h"
#include "lldb/Host/Host.h"
+#include "lldb/Host/HostInfo.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/Symbols.h"
#include "lldb/Symbol/ObjectFile.h"
@@ -761,7 +762,7 @@ PlatformDarwin::ModuleIsExcludedForNonModuleSpecificSearches (lldb_private::Targ
bool
PlatformDarwin::x86GetSupportedArchitectureAtIndex (uint32_t idx, ArchSpec &arch)
{
- ArchSpec host_arch = Host::GetArchitecture (Host::eSystemDefaultArchitecture);
+ ArchSpec host_arch = HostInfo::GetArchitecture(HostInfo::eArchKindDefault);
if (host_arch.GetCore() == ArchSpec::eCore_x86_64_x86_64h)
{
switch (idx)
@@ -775,7 +776,7 @@ PlatformDarwin::x86GetSupportedArchitectureAtIndex (uint32_t idx, ArchSpec &arch
return true;
case 2:
- arch = Host::GetArchitecture (Host::eSystemDefaultArchitecture32);
+ arch = HostInfo::GetArchitecture(HostInfo::eArchKind32);
return true;
default: return false;
@@ -785,19 +786,19 @@ PlatformDarwin::x86GetSupportedArchitectureAtIndex (uint32_t idx, ArchSpec &arch
{
if (idx == 0)
{
- arch = Host::GetArchitecture (Host::eSystemDefaultArchitecture);
+ arch = HostInfo::GetArchitecture(HostInfo::eArchKindDefault);
return arch.IsValid();
}
else if (idx == 1)
{
- ArchSpec platform_arch (Host::GetArchitecture (Host::eSystemDefaultArchitecture));
- ArchSpec platform_arch64 (Host::GetArchitecture (Host::eSystemDefaultArchitecture64));
+ ArchSpec platform_arch(HostInfo::GetArchitecture(HostInfo::eArchKindDefault));
+ ArchSpec platform_arch64(HostInfo::GetArchitecture(HostInfo::eArchKind64));
if (platform_arch.IsExactMatch(platform_arch64))
{
// This macosx platform supports both 32 and 64 bit. Since we already
// returned the 64 bit arch for idx == 0, return the 32 bit arch
// for idx == 1
- arch = Host::GetArchitecture (Host::eSystemDefaultArchitecture32);
+ arch = HostInfo::GetArchitecture(HostInfo::eArchKind32);
return arch.IsValid();
}
}
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
index 6fb0079b23b..8f7e7520f5e 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
@@ -44,7 +44,7 @@ PlatformMacOSX::Initialize ()
{
#if defined (__APPLE__)
PlatformSP default_platform_sp (new PlatformMacOSX(true));
- default_platform_sp->SetSystemArchitecture (Host::GetArchitecture());
+ default_platform_sp->SetSystemArchitecture(HostInfo::GetArchitecture());
Platform::SetDefaultPlatform (default_platform_sp);
#endif
PluginManager::RegisterPlugin (PlatformMacOSX::GetPluginNameStatic(false),
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
index cc1f432aab8..0d4523e46b0 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
@@ -23,6 +23,7 @@
#include "lldb/Core/StreamString.h"
#include "lldb/Host/FileSpec.h"
#include "lldb/Host/Host.h"
+#include "lldb/Host/HostInfo.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/Target.h"
@@ -425,8 +426,8 @@ PlatformiOSSimulator::FindProcesses (const ProcessInstanceInfoMatch &match_info,
bool
PlatformiOSSimulator::GetSupportedArchitectureAtIndex (uint32_t idx, ArchSpec &arch)
{
- static const ArchSpec platform_arch (Host::GetArchitecture (Host::eSystemDefaultArchitecture));
- static const ArchSpec platform_arch64 (Host::GetArchitecture (Host::eSystemDefaultArchitecture64));
+ static const ArchSpec platform_arch(HostInfo::GetArchitecture(HostInfo::eArchKindDefault));
+ static const ArchSpec platform_arch64(HostInfo::GetArchitecture(HostInfo::eArchKind64));
if (idx == 0)
{
@@ -450,7 +451,7 @@ PlatformiOSSimulator::GetSupportedArchitectureAtIndex (uint32_t idx, ArchSpec &a
}
else if (idx == 2 || idx == 3)
{
- arch = Host::GetArchitecture (Host::eSystemDefaultArchitecture32);
+ arch = HostInfo::GetArchitecture(HostInfo::eArchKind32);
if (arch.IsValid())
{
if (idx == 2)
OpenPOWER on IntegriCloud