/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/include/lldb/Interpreter/OptionGroupFile.h
Line | Count | Source (jump to first uncovered line) |
1 | | //===-- OptionGroupFile.h ---------------------------------------*- C++ -*-===// |
2 | | // |
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 |
6 | | // |
7 | | //===----------------------------------------------------------------------===// |
8 | | |
9 | | #ifndef LLDB_INTERPRETER_OPTIONGROUPFILE_H |
10 | | #define LLDB_INTERPRETER_OPTIONGROUPFILE_H |
11 | | |
12 | | #include "lldb/Interpreter/OptionValueFileSpec.h" |
13 | | #include "lldb/Interpreter/OptionValueFileSpecList.h" |
14 | | #include "lldb/Interpreter/Options.h" |
15 | | |
16 | | namespace lldb_private { |
17 | | |
18 | | // OptionGroupFile |
19 | | |
20 | | class OptionGroupFile : public OptionGroup { |
21 | | public: |
22 | | OptionGroupFile(uint32_t usage_mask, bool required, const char *long_option, |
23 | | int short_option, uint32_t completion_type, |
24 | | lldb::CommandArgumentType argument_type, |
25 | | const char *usage_text); |
26 | | |
27 | 36.5k | ~OptionGroupFile() override = default; |
28 | | |
29 | 36.5k | llvm::ArrayRef<OptionDefinition> GetDefinitions() override { |
30 | 36.5k | return llvm::ArrayRef<OptionDefinition>(&m_option_definition, 1); |
31 | 36.5k | } |
32 | | |
33 | | Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, |
34 | | ExecutionContext *execution_context) override; |
35 | | |
36 | | void OptionParsingStarting(ExecutionContext *execution_context) override; |
37 | | |
38 | 2.92k | OptionValueFileSpec &GetOptionValue() { return m_file; } |
39 | | |
40 | 0 | const OptionValueFileSpec &GetOptionValue() const { return m_file; } |
41 | | |
42 | | protected: |
43 | | OptionValueFileSpec m_file; |
44 | | OptionDefinition m_option_definition; |
45 | | }; |
46 | | |
47 | | // OptionGroupFileList |
48 | | |
49 | | class OptionGroupFileList : public OptionGroup { |
50 | | public: |
51 | | OptionGroupFileList(uint32_t usage_mask, bool required, |
52 | | const char *long_option, int short_option, |
53 | | uint32_t completion_type, |
54 | | lldb::CommandArgumentType argument_type, |
55 | | const char *usage_text); |
56 | | |
57 | | ~OptionGroupFileList() override; |
58 | | |
59 | 12.1k | llvm::ArrayRef<OptionDefinition> GetDefinitions() override { |
60 | 12.1k | return llvm::ArrayRef<OptionDefinition>(&m_option_definition, 1); |
61 | 12.1k | } |
62 | | |
63 | | Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, |
64 | | ExecutionContext *execution_context) override; |
65 | | |
66 | | void OptionParsingStarting(ExecutionContext *execution_context) override; |
67 | | |
68 | 10 | OptionValueFileSpecList &GetOptionValue() { return m_file_list; } |
69 | | |
70 | 0 | const OptionValueFileSpecList &GetOptionValue() const { return m_file_list; } |
71 | | |
72 | | protected: |
73 | | OptionValueFileSpecList m_file_list; |
74 | | OptionDefinition m_option_definition; |
75 | | }; |
76 | | |
77 | | } // namespace lldb_private |
78 | | |
79 | | #endif // LLDB_INTERPRETER_OPTIONGROUPFILE_H |