]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupArchitecture.h
Merge compiler-rt trunk r321017 to contrib/compiler-rt.
[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 #include "lldb/Interpreter/Options.h"
14 #include "lldb/Utility/ArchSpec.h"
15
16 namespace lldb_private {
17
18 //-------------------------------------------------------------------------
19 // OptionGroupArchitecture
20 //-------------------------------------------------------------------------
21
22 class OptionGroupArchitecture : public OptionGroup {
23 public:
24   OptionGroupArchitecture();
25
26   ~OptionGroupArchitecture() override;
27
28   llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
29
30   Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
31                         ExecutionContext *execution_context) override;
32
33   void OptionParsingStarting(ExecutionContext *execution_context) override;
34
35   bool GetArchitecture(Platform *platform, ArchSpec &arch);
36
37   bool ArchitectureWasSpecified() const { return !m_arch_str.empty(); }
38
39   llvm::StringRef GetArchitectureName() const { return m_arch_str; }
40
41 protected:
42   std::string m_arch_str; // Save the arch triple in case a platform is
43                           // specified after the architecture
44 };
45
46 } // namespace lldb_private
47
48 #endif // liblldb_OptionGroupArchitecture_h_