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_
13 #include "lldb/Interpreter/Options.h"
14 #include "lldb/Utility/ArchSpec.h"
16 namespace lldb_private {
18 //-------------------------------------------------------------------------
19 // OptionGroupArchitecture
20 //-------------------------------------------------------------------------
22 class OptionGroupArchitecture : public OptionGroup {
24 OptionGroupArchitecture();
26 ~OptionGroupArchitecture() override;
28 llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
30 Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
31 ExecutionContext *execution_context) override;
33 void OptionParsingStarting(ExecutionContext *execution_context) override;
35 bool GetArchitecture(Platform *platform, ArchSpec &arch);
37 bool ArchitectureWasSpecified() const { return !m_arch_str.empty(); }
39 llvm::StringRef GetArchitectureName() const { return m_arch_str; }
42 std::string m_arch_str; // Save the arch triple in case a platform is
43 // specified after the architecture
46 } // namespace lldb_private
48 #endif // liblldb_OptionGroupArchitecture_h_