Coverage Report

Created: 2022-01-15 10:30

/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/include/lldb/Interpreter/OptionValuePathMappings.h
Line
Count
Source (jump to first uncovered line)
1
//===-- OptionValuePathMappings.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_OPTIONVALUEPATHMAPPINGS_H
10
#define LLDB_INTERPRETER_OPTIONVALUEPATHMAPPINGS_H
11
12
#include "lldb/Interpreter/OptionValue.h"
13
#include "lldb/Target/PathMappingList.h"
14
15
namespace lldb_private {
16
17
class OptionValuePathMappings
18
    : public Cloneable<OptionValuePathMappings, OptionValue> {
19
public:
20
  OptionValuePathMappings(bool notify_changes)
21
3.40k
      : m_notify_changes(notify_changes) {}
22
23
8.87k
  ~OptionValuePathMappings() override = default;
24
25
  // Virtual subclass pure virtual overrides
26
27
28.4k
  OptionValue::Type GetType() const override { return eTypePathMap; }
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
3.39k
  void Clear() override {
37
3.39k
    m_path_mappings.Clear(m_notify_changes);
38
3.39k
    m_value_was_set = false;
39
3.39k
  }
40
41
0
  bool IsAggregateValue() const override { return true; }
42
43
  // Subclass specific functions
44
45
28.3k
  PathMappingList &GetCurrentValue() { return m_path_mappings; }
46
47
0
  const PathMappingList &GetCurrentValue() const { return m_path_mappings; }
48
49
protected:
50
  PathMappingList m_path_mappings;
51
  bool m_notify_changes;
52
};
53
54
} // namespace lldb_private
55
56
#endif // LLDB_INTERPRETER_OPTIONVALUEPATHMAPPINGS_H