]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupArchitecture.h
MFV r323107: 8414 Implemented zpool scrub pause/resume
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Interpreter / OptionGroupArchitecture.h
1 //===-- OptionGroupArchitecture.h -------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef liblldb_OptionGroupArchitecture_h_
11 #define liblldb_OptionGroupArchitecture_h_
12
13 // C Includes
14 // C++ Includes
15 // Other libraries and framework includes
16 // Project includes
17 #include "lldb/Core/ArchSpec.h"
18 #include "lldb/Interpreter/Options.h"
19
20 namespace lldb_private {
21
22 //-------------------------------------------------------------------------
23 // OptionGroupArchitecture
24 //-------------------------------------------------------------------------
25
26 class OptionGroupArchitecture : public OptionGroup {
27 public:
28   OptionGroupArchitecture();
29
30   ~OptionGroupArchitecture() override;
31
32   llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
33
34   Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
35                         ExecutionContext *execution_context) override;
36
37   void OptionParsingStarting(ExecutionContext *execution_context) override;
38
39   bool GetArchitecture(Platform *platform, ArchSpec &arch);
40
41   bool ArchitectureWasSpecified() const { return !m_arch_str.empty(); }
42
43   llvm::StringRef GetArchitectureName() const { return m_arch_str; }
44
45 protected:
46   std::string m_arch_str; // Save the arch triple in case a platform is
47                           // specified after the architecture
48 };
49
50 } // namespace lldb_private
51
52 #endif // liblldb_OptionGroupArchitecture_h_