1 //===-- OptionGroupArchitecture.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_OptionGroupArchitecture_h_
11 #define liblldb_OptionGroupArchitecture_h_
15 // Other libraries and framework includes
17 #include "lldb/Interpreter/Options.h"
18 #include "lldb/Core/ArchSpec.h"
20 namespace lldb_private {
22 //-------------------------------------------------------------------------
23 // OptionGroupArchitecture
24 //-------------------------------------------------------------------------
26 class OptionGroupArchitecture : public OptionGroup
29 OptionGroupArchitecture ();
31 ~OptionGroupArchitecture() override;
34 GetNumDefinitions() override;
36 const OptionDefinition*
37 GetDefinitions() override;
40 SetOptionValue(CommandInterpreter &interpreter,
42 const char *option_value) override;
45 OptionParsingStarting(CommandInterpreter &interpreter) override;
48 GetArchitecture (Platform *platform, ArchSpec &arch);
51 ArchitectureWasSpecified () const
53 return !m_arch_str.empty();
59 return (m_arch_str.empty() ? nullptr : m_arch_str.c_str());
63 std::string m_arch_str; // Save the arch triple in case a platform is specified after the architecture
66 } // namespace lldb_private
68 #endif // liblldb_OptionGroupArchitecture_h_