1 //===-- OptionGroupArchitecture.h -------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef liblldb_OptionGroupArchitecture_h_
10 #define liblldb_OptionGroupArchitecture_h_
12 #include "lldb/Interpreter/Options.h"
13 #include "lldb/Utility/ArchSpec.h"
15 namespace lldb_private {
17 // OptionGroupArchitecture
19 class OptionGroupArchitecture : public OptionGroup {
21 OptionGroupArchitecture();
23 ~OptionGroupArchitecture() override;
25 llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
27 Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
28 ExecutionContext *execution_context) override;
30 void OptionParsingStarting(ExecutionContext *execution_context) override;
32 bool GetArchitecture(Platform *platform, ArchSpec &arch);
34 bool ArchitectureWasSpecified() const { return !m_arch_str.empty(); }
36 llvm::StringRef GetArchitectureName() const { return m_arch_str; }
39 std::string m_arch_str; // Save the arch triple in case a platform is
40 // specified after the architecture
43 } // namespace lldb_private
45 #endif // liblldb_OptionGroupArchitecture_h_