Coverage Report

Created: 2022-01-15 10:30

/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/include/lldb/Interpreter/OptionValueFileColonLine.h
Line
Count
Source (jump to first uncovered line)
1
//===-- OptionValueFileColonLine.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_OPTIONVALUEFILECOLONLINE_H
10
#define LLDB_INTERPRETER_OPTIONVALUEFILECOLONLINE_H
11
12
#include "lldb/Interpreter/CommandCompletions.h"
13
#include "lldb/Interpreter/OptionValue.h"
14
#include "lldb/Utility/FileSpec.h"
15
#include "llvm/Support/Chrono.h"
16
17
namespace lldb_private {
18
19
class OptionValueFileColonLine :
20
    public Cloneable<OptionValueFileColonLine, OptionValue> {
21
public:
22
  OptionValueFileColonLine();
23
  OptionValueFileColonLine(const llvm::StringRef input);
24
25
18
  ~OptionValueFileColonLine() override = default;
26
27
0
  OptionValue::Type GetType() const override { return eTypeFileLineColumn; }
28
29
  void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
30
                 uint32_t dump_mask) override;
31
32
  Status
33
  SetValueFromString(llvm::StringRef value,
34
                     VarSetOperationType op = eVarSetOperationAssign) override;
35
36
0
  void Clear() override {
37
0
    m_file_spec.Clear();
38
0
    m_line_number = LLDB_INVALID_LINE_NUMBER;
39
0
    m_column_number = LLDB_INVALID_COLUMN_NUMBER;
40
0
  }
41
42
  void AutoComplete(CommandInterpreter &interpreter,
43
                    CompletionRequest &request) override;
44
45
12
  FileSpec &GetFileSpec() { return m_file_spec; }
46
12
  uint32_t GetLineNumber() { return m_line_number; }
47
11
  uint32_t GetColumnNumber() { return m_column_number; }
48
49
0
  void SetCompletionMask(uint32_t mask) { m_completion_mask = mask; }
50
51
protected:
52
  FileSpec m_file_spec;
53
  uint32_t m_line_number = LLDB_INVALID_LINE_NUMBER;
54
  uint32_t m_column_number = LLDB_INVALID_COLUMN_NUMBER;
55
  uint32_t m_completion_mask = CommandCompletions::eSourceFileCompletion;
56
};
57
58
} // namespace lldb_private
59
60
#endif // LLDB_INTERPRETER_OPTIONVALUEFILECOLONLINE_H