Coverage Report

Created: 2023-09-30 09:22

/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/include/lldb/Symbol/TaggedASTType.h
Line
Count
Source
1
//===-- TaggedASTType.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_SYMBOL_TAGGEDASTTYPE_H
10
#define LLDB_SYMBOL_TAGGEDASTTYPE_H
11
12
#include "lldb/Symbol/CompilerType.h"
13
14
namespace lldb_private {
15
16
// For cases in which there are multiple classes of types that are not
17
// interchangeable, to allow static type checking.
18
template <unsigned int C> class TaggedASTType : public CompilerType {
19
public:
20
  TaggedASTType(const CompilerType &compiler_type)
21
49.2k
      : CompilerType(compiler_type) {}
lldb_private::TaggedASTType<1u>::TaggedASTType(lldb_private::CompilerType const&)
Line
Count
Source
21
28.4k
      : CompilerType(compiler_type) {}
lldb_private::TaggedASTType<0u>::TaggedASTType(lldb_private::CompilerType const&)
Line
Count
Source
21
20.8k
      : CompilerType(compiler_type) {}
22
23
  TaggedASTType(lldb::opaque_compiler_type_t type,
24
                lldb::TypeSystemWP type_system)
25
140
      : CompilerType(type_system, type) {}
26
27
13.6k
  TaggedASTType(const TaggedASTType<C> &tw) : CompilerType(tw) {}
Unexecuted instantiation: lldb_private::TaggedASTType<1u>::TaggedASTType(lldb_private::TaggedASTType<1u> const&)
lldb_private::TaggedASTType<0u>::TaggedASTType(lldb_private::TaggedASTType<0u> const&)
Line
Count
Source
27
13.6k
  TaggedASTType(const TaggedASTType<C> &tw) : CompilerType(tw) {}
28
29
39.9k
  TaggedASTType() : CompilerType() {}
lldb_private::TaggedASTType<1u>::TaggedASTType()
Line
Count
Source
29
16.5k
  TaggedASTType() : CompilerType() {}
lldb_private::TaggedASTType<0u>::TaggedASTType()
Line
Count
Source
29
23.3k
  TaggedASTType() : CompilerType() {}
30
31
102k
  virtual ~TaggedASTType() = default;
lldb_private::TaggedASTType<1u>::~TaggedASTType()
Line
Count
Source
31
45.1k
  virtual ~TaggedASTType() = default;
lldb_private::TaggedASTType<0u>::~TaggedASTType()
Line
Count
Source
31
57.8k
  virtual ~TaggedASTType() = default;
32
33
34.2k
  TaggedASTType<C> &operator=(const TaggedASTType<C> &tw) {
34
34.2k
    CompilerType::operator=(tw);
35
34.2k
    return *this;
36
34.2k
  }
lldb_private::TaggedASTType<1u>::operator=(lldb_private::TaggedASTType<1u> const&)
Line
Count
Source
33
13.7k
  TaggedASTType<C> &operator=(const TaggedASTType<C> &tw) {
34
13.7k
    CompilerType::operator=(tw);
35
13.7k
    return *this;
36
13.7k
  }
lldb_private::TaggedASTType<0u>::operator=(lldb_private::TaggedASTType<0u> const&)
Line
Count
Source
33
20.5k
  TaggedASTType<C> &operator=(const TaggedASTType<C> &tw) {
34
20.5k
    CompilerType::operator=(tw);
35
20.5k
    return *this;
36
20.5k
  }
37
};
38
39
// Commonly-used tagged types, so code using them is interoperable
40
typedef TaggedASTType<0> TypeFromParser;
41
typedef TaggedASTType<1> TypeFromUser;
42
}
43
44
#endif