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