diff options
author | Ed Maste <emaste@FreeBSD.org> | 2015-02-09 01:44:09 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2015-02-09 01:44:09 +0000 |
commit | 12bd4897ff0678fa663e09d78ebc22dd255ceb86 (patch) | |
tree | a8f4b3abea3e6937e60728991c736e6e3d322fc1 /source/Interpreter/OptionGroupPlatform.cpp | |
parent | 205afe679855a4ce8149cdaa94d3f0868ce796dc (diff) |
Notes
Diffstat (limited to 'source/Interpreter/OptionGroupPlatform.cpp')
-rw-r--r-- | source/Interpreter/OptionGroupPlatform.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/source/Interpreter/OptionGroupPlatform.cpp b/source/Interpreter/OptionGroupPlatform.cpp index 7e5e1245a79fb..6bb36552d06bb 100644 --- a/source/Interpreter/OptionGroupPlatform.cpp +++ b/source/Interpreter/OptionGroupPlatform.cpp @@ -147,3 +147,38 @@ OptionGroupPlatform::SetOptionValue (CommandInterpreter &interpreter, } return error; } + +bool +OptionGroupPlatform::PlatformMatches(const lldb::PlatformSP &platform_sp) const +{ + if (platform_sp) + { + if (!m_platform_name.empty()) + { + if (platform_sp->GetName() != ConstString(m_platform_name.c_str())) + return false; + } + + if (m_sdk_build && m_sdk_build != platform_sp->GetSDKBuild()) + return false; + + if (m_sdk_sysroot && m_sdk_sysroot != platform_sp->GetSDKRootDirectory()) + return false; + + if (m_os_version_major != UINT32_MAX) + { + uint32_t major, minor, update; + if (platform_sp->GetOSVersion (major, minor, update)) + { + if (m_os_version_major != major) + return false; + if (m_os_version_minor != minor) + return false; + if (m_os_version_update != update) + return false; + } + } + return true; + } + return false; +} |