1 //===-- OptionGroupPlatform.h -----------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_OptionGroupPlatform_h_
11 #define liblldb_OptionGroupPlatform_h_
15 // Other libraries and framework includes
17 #include "lldb/Core/ConstString.h"
18 #include "lldb/Interpreter/Options.h"
20 namespace lldb_private {
22 //-------------------------------------------------------------------------
23 // PlatformOptionGroup
25 // Make platform options available to any commands that need the settings.
26 //-------------------------------------------------------------------------
27 class OptionGroupPlatform : public OptionGroup
31 OptionGroupPlatform (bool include_platform_option) :
35 m_os_version_major (UINT32_MAX),
36 m_os_version_minor (UINT32_MAX),
37 m_os_version_update (UINT32_MAX),
38 m_include_platform_option (include_platform_option)
43 ~OptionGroupPlatform ()
50 virtual const OptionDefinition*
54 SetOptionValue (CommandInterpreter &interpreter,
56 const char *option_value);
59 OptionParsingStarting (CommandInterpreter &interpreter);
62 CreatePlatformWithOptions (CommandInterpreter &interpreter,
66 ArchSpec &platform_arch) const;
69 PlatformWasSpecified () const
71 return !m_platform_name.empty();
75 SetPlatformName (const char *platform_name)
77 if (platform_name && platform_name[0])
78 m_platform_name.assign (platform_name);
80 m_platform_name.clear();
84 GetSDKRootDirectory () const
90 SetSDKRootDirectory (const ConstString &sdk_root_directory)
92 m_sdk_sysroot = sdk_root_directory;
102 SetSDKBuild (const ConstString &sdk_build)
104 m_sdk_build = sdk_build;
108 PlatformMatches(const lldb::PlatformSP &platform_sp) const;
111 std::string m_platform_name;
112 ConstString m_sdk_sysroot;
113 ConstString m_sdk_build;
114 uint32_t m_os_version_major;
115 uint32_t m_os_version_minor;
116 uint32_t m_os_version_update;
117 bool m_include_platform_option;
120 } // namespace lldb_private
122 #endif // liblldb_OptionGroupPlatform_h_