Coverage Report

Created: 2022-01-22 13:19

/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
65.0k
      : CompilerType(compiler_type) {}
lldb_private::TaggedASTType<1u>::TaggedASTType(lldb_private::CompilerType const&)
Line
Count
Source
21
37.3k
      : CompilerType(compiler_type) {}
lldb_private::TaggedASTType<0u>::TaggedASTType(lldb_private::CompilerType const&)
Line
Count
Source
21
27.6k
      : CompilerType(compiler_type) {}
22
23
  TaggedASTType(lldb::opaque_compiler_type_t type, TypeSystem *type_system)
24
13.2k
      : CompilerType(type_system, type) {}
25
26
17.5k
  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
26
17.5k
  TaggedASTType(const TaggedASTType<C> &tw) : CompilerType(tw) {}
27
28
52.8k
  TaggedASTType() : CompilerType() {}
lldb_private::TaggedASTType<1u>::TaggedASTType()
Line
Count
Source
28
21.8k
  TaggedASTType() : CompilerType() {}
lldb_private::TaggedASTType<0u>::TaggedASTType()
Line
Count
Source
28
30.9k
  TaggedASTType() : CompilerType() {}
29
30
148k
  virtual ~TaggedASTType() = default;
lldb_private::TaggedASTType<1u>::~TaggedASTType()
Line
Count
Source
30
72.4k
  virtual ~TaggedASTType() = default;
lldb_private::TaggedASTType<0u>::~TaggedASTType()
Line
Count
Source
30
76.1k
  virtual ~TaggedASTType() = default;
31
32
46.0k
  TaggedASTType<C> &operator=(const TaggedASTType<C> &tw) {
33
46.0k
    CompilerType::operator=(tw);
34
46.0k
    return *this;
35
46.0k
  }
lldb_private::TaggedASTType<1u>::operator=(lldb_private::TaggedASTType<1u> const&)
Line
Count
Source
32
18.7k
  TaggedASTType<C> &operator=(const TaggedASTType<C> &tw) {
33
18.7k
    CompilerType::operator=(tw);
34
18.7k
    return *this;
35
18.7k
  }
lldb_private::TaggedASTType<0u>::operator=(lldb_private::TaggedASTType<0u> const&)
Line
Count
Source
32
27.2k
  TaggedASTType<C> &operator=(const TaggedASTType<C> &tw) {
33
27.2k
    CompilerType::operator=(tw);
34
27.2k
    return *this;
35
27.2k
  }
36
};
37
38
// Commonly-used tagged types, so code using them is interoperable
39
typedef TaggedASTType<0> TypeFromParser;
40
typedef TaggedASTType<1> TypeFromUser;
41
}
42
43
#endif