Coverage Report

Created: 2018-07-19 03:59

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include/llvm/ADT/TinyPtrVector.h
Line
Count
Source (jump to first uncovered line)
1
//===- llvm/ADT/TinyPtrVector.h - 'Normally tiny' vectors -------*- C++ -*-===//
2
//
3
//                     The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
10
#ifndef LLVM_ADT_TINYPTRVECTOR_H
11
#define LLVM_ADT_TINYPTRVECTOR_H
12
13
#include "llvm/ADT/ArrayRef.h"
14
#include "llvm/ADT/None.h"
15
#include "llvm/ADT/PointerUnion.h"
16
#include "llvm/ADT/SmallVector.h"
17
#include <cassert>
18
#include <cstddef>
19
#include <iterator>
20
#include <type_traits>
21
22
namespace llvm {
23
24
/// TinyPtrVector - This class is specialized for cases where there are
25
/// normally 0 or 1 element in a vector, but is general enough to go beyond that
26
/// when required.
27
///
28
/// NOTE: This container doesn't allow you to store a null pointer into it.
29
///
30
template <typename EltTy>
31
class TinyPtrVector {
32
public:
33
  using VecTy = SmallVector<EltTy, 4>;
34
  using value_type = typename VecTy::value_type;
35
  using PtrUnion = PointerUnion<EltTy, VecTy *>;
36
37
private:
38
  PtrUnion Val;
39
40
public:
41
294M
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::BasicBlock*>::TinyPtrVector()
Line
Count
Source
41
1.80k
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::MCSymbol*>::TinyPtrVector()
Line
Count
Source
41
507
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::Metadata*>::TinyPtrVector()
Line
Count
Source
41
103
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::DbgInfoIntrinsic*>::TinyPtrVector()
Line
Count
Source
41
4.97M
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::Value*>::TinyPtrVector()
Line
Count
Source
41
307
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::PHINode*>::TinyPtrVector()
Line
Count
Source
41
57
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::Instruction*>::TinyPtrVector()
Line
Count
Source
41
2.67k
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::Function*>::TinyPtrVector()
Line
Count
Source
41
7
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::ModuleMacro*>::TinyPtrVector()
Line
Count
Source
41
27.5k
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::DISubprogram const*>::TinyPtrVector()
Line
Count
Source
41
62
  TinyPtrVector() = default;
llvm::TinyPtrVector<int*>::TinyPtrVector()
Line
Count
Source
41
26
  TinyPtrVector() = default;
llvm::TinyPtrVector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, llvm::TypeIdSummary> const*>::TinyPtrVector()
Line
Count
Source
41
8
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::ObjCPropertyDecl*>::TinyPtrVector()
Line
Count
Source
41
112
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::ParsedAttr*>::TinyPtrVector()
Line
Count
Source
41
289M
  TinyPtrVector() = default;
llvm::TinyPtrVector<void*>::TinyPtrVector()
Line
Count
Source
41
9.84k
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::serialization::ModuleFile*>::TinyPtrVector()
Line
Count
Source
41
9.84k
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::NamedDecl*>::TinyPtrVector()
Line
Count
Source
41
8.75k
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::ParmVarDecl*>::TinyPtrVector()
Line
Count
Source
41
3
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::Module*>::TinyPtrVector()
Line
Count
Source
41
526
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::TinyPtrVector()
Line
Count
Source
41
87.1k
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::TinyPtrVector()
Line
Count
Source
41
11.7k
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::AnalysisKey*>::TinyPtrVector()
Line
Count
Source
41
347
  TinyPtrVector() = default;
llvm::TinyPtrVector<lld::elf::InputSection*>::TinyPtrVector()
Line
Count
Source
41
319k
  TinyPtrVector() = default;
42
43
373M
  ~TinyPtrVector() {
44
373M
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
6.28M
      delete V;
46
373M
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::~TinyPtrVector()
Line
Count
Source
43
1.80k
  ~TinyPtrVector() {
44
1.80k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
22
      delete V;
46
1.80k
  }
llvm::TinyPtrVector<llvm::AnalysisKey*>::~TinyPtrVector()
Line
Count
Source
43
347
  ~TinyPtrVector() {
44
347
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
0
      delete V;
46
347
  }
llvm::TinyPtrVector<llvm::MCSymbol*>::~TinyPtrVector()
Line
Count
Source
43
507
  ~TinyPtrVector() {
44
507
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
0
      delete V;
46
507
  }
llvm::TinyPtrVector<llvm::Metadata*>::~TinyPtrVector()
Line
Count
Source
43
103
  ~TinyPtrVector() {
44
103
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
0
      delete V;
46
103
  }
llvm::TinyPtrVector<llvm::DbgInfoIntrinsic*>::~TinyPtrVector()
Line
Count
Source
43
4.97M
  ~TinyPtrVector() {
44
4.97M
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
2
      delete V;
46
4.97M
  }
llvm::TinyPtrVector<llvm::Value*>::~TinyPtrVector()
Line
Count
Source
43
705
  ~TinyPtrVector() {
44
705
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
5
      delete V;
46
705
  }
llvm::TinyPtrVector<llvm::PHINode*>::~TinyPtrVector()
Line
Count
Source
43
171
  ~TinyPtrVector() {
44
171
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
0
      delete V;
46
171
  }
llvm::TinyPtrVector<llvm::Instruction*>::~TinyPtrVector()
Line
Count
Source
43
2.67k
  ~TinyPtrVector() {
44
2.67k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
1.39k
      delete V;
46
2.67k
  }
llvm::TinyPtrVector<llvm::Function*>::~TinyPtrVector()
Line
Count
Source
43
14
  ~TinyPtrVector() {
44
14
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
8
      delete V;
46
14
  }
llvm::TinyPtrVector<clang::ModuleMacro*>::~TinyPtrVector()
Line
Count
Source
43
46.3k
  ~TinyPtrVector() {
44
46.3k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
487
      delete V;
46
46.3k
  }
llvm::TinyPtrVector<llvm::DISubprogram const*>::~TinyPtrVector()
Line
Count
Source
43
206
  ~TinyPtrVector() {
44
206
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
1
      delete V;
46
206
  }
llvm::TinyPtrVector<int*>::~TinyPtrVector()
Line
Count
Source
43
49
  ~TinyPtrVector() {
44
49
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
14
      delete V;
46
49
  }
llvm::TinyPtrVector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, llvm::TypeIdSummary> const*>::~TinyPtrVector()
Line
Count
Source
43
8
  ~TinyPtrVector() {
44
8
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
0
      delete V;
46
8
  }
llvm::TinyPtrVector<clang::ObjCPropertyDecl*>::~TinyPtrVector()
Line
Count
Source
43
112
  ~TinyPtrVector() {
44
112
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
18
      delete V;
46
112
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::~TinyPtrVector()
Line
Count
Source
43
367M
  ~TinyPtrVector() {
44
367M
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
6.27M
      delete V;
46
367M
  }
llvm::TinyPtrVector<clang::serialization::ModuleFile*>::~TinyPtrVector()
Line
Count
Source
43
11.2k
  ~TinyPtrVector() {
44
11.2k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
40
      delete V;
46
11.2k
  }
llvm::TinyPtrVector<void*>::~TinyPtrVector()
Line
Count
Source
43
11.2k
  ~TinyPtrVector() {
44
11.2k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
1.25k
      delete V;
46
11.2k
  }
llvm::TinyPtrVector<clang::ParmVarDecl*>::~TinyPtrVector()
Line
Count
Source
43
3
  ~TinyPtrVector() {
44
3
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
2
      delete V;
46
3
  }
llvm::TinyPtrVector<clang::NamedDecl*>::~TinyPtrVector()
Line
Count
Source
43
8.75k
  ~TinyPtrVector() {
44
8.75k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
4.21k
      delete V;
46
8.75k
  }
llvm::TinyPtrVector<clang::Module*>::~TinyPtrVector()
Line
Count
Source
43
761
  ~TinyPtrVector() {
44
761
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
102
      delete V;
46
761
  }
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::~TinyPtrVector()
Line
Count
Source
43
93.2k
  ~TinyPtrVector() {
44
93.2k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
185
      delete V;
46
93.2k
  }
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::~TinyPtrVector()
Line
Count
Source
43
11.7k
  ~TinyPtrVector() {
44
11.7k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
4.30k
      delete V;
46
11.7k
  }
llvm::TinyPtrVector<lld::elf::InputSection*>::~TinyPtrVector()
Line
Count
Source
43
319k
  ~TinyPtrVector() {
44
319k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
3
      delete V;
46
319k
  }
47
48
78.4M
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
49
78.4M
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
50
2.05M
      Val = new VecTy(*V);
51
78.4M
  }
llvm::TinyPtrVector<llvm::Value*>::TinyPtrVector(llvm::TinyPtrVector<llvm::Value*> const&)
Line
Count
Source
48
130
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
49
130
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
50
0
      Val = new VecTy(*V);
51
130
  }
llvm::TinyPtrVector<llvm::PHINode*>::TinyPtrVector(llvm::TinyPtrVector<llvm::PHINode*> const&)
Line
Count
Source
48
57
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
49
57
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
50
0
      Val = new VecTy(*V);
51
57
  }
llvm::TinyPtrVector<llvm::Function*>::TinyPtrVector(llvm::TinyPtrVector<llvm::Function*> const&)
Line
Count
Source
48
7
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
49
7
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
50
4
      Val = new VecTy(*V);
51
7
  }
llvm::TinyPtrVector<llvm::DISubprogram const*>::TinyPtrVector(llvm::TinyPtrVector<llvm::DISubprogram const*> const&)
Line
Count
Source
48
22
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
49
22
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
50
0
      Val = new VecTy(*V);
51
22
  }
llvm::TinyPtrVector<int*>::TinyPtrVector(llvm::TinyPtrVector<int*> const&)
Line
Count
Source
48
10
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
49
10
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
50
1
      Val = new VecTy(*V);
51
10
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::TinyPtrVector(llvm::TinyPtrVector<clang::ParsedAttr*> const&)
Line
Count
Source
48
78.4M
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
49
78.4M
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
50
2.05M
      Val = new VecTy(*V);
51
78.4M
  }
52
53
65.1k
  TinyPtrVector &operator=(const TinyPtrVector &RHS) {
54
65.1k
    if (this == &RHS)
55
0
      return *this;
56
65.1k
    if (RHS.empty()) {
57
63.9k
      this->clear();
58
63.9k
      return *this;
59
63.9k
    }
60
1.18k
61
1.18k
    // Try to squeeze into the single slot. If it won't fit, allocate a copied
62
1.18k
    // vector.
63
1.18k
    if (Val.template is<EltTy>()) {
64
1.18k
      if (RHS.size() == 1)
65
1.18k
        Val = RHS.front();
66
0
      else
67
0
        Val = new VecTy(*RHS.Val.template get<VecTy*>());
68
1.18k
      return *this;
69
1.18k
    }
70
0
71
0
    // If we have a full vector allocated, try to re-use it.
72
0
    if (RHS.Val.template is<EltTy>()) {
73
0
      Val.template get<VecTy*>()->clear();
74
0
      Val.template get<VecTy*>()->push_back(RHS.front());
75
0
    } else {
76
0
      *Val.template get<VecTy*>() = *RHS.Val.template get<VecTy*>();
77
0
    }
78
0
    return *this;
79
0
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::operator=(llvm::TinyPtrVector<llvm::BasicBlock*> const&)
Line
Count
Source
53
5
  TinyPtrVector &operator=(const TinyPtrVector &RHS) {
54
5
    if (this == &RHS)
55
0
      return *this;
56
5
    if (RHS.empty()) {
57
0
      this->clear();
58
0
      return *this;
59
0
    }
60
5
61
5
    // Try to squeeze into the single slot. If it won't fit, allocate a copied
62
5
    // vector.
63
5
    if (Val.template is<EltTy>()) {
64
5
      if (RHS.size() == 1)
65
5
        Val = RHS.front();
66
0
      else
67
0
        Val = new VecTy(*RHS.Val.template get<VecTy*>());
68
5
      return *this;
69
5
    }
70
0
71
0
    // If we have a full vector allocated, try to re-use it.
72
0
    if (RHS.Val.template is<EltTy>()) {
73
0
      Val.template get<VecTy*>()->clear();
74
0
      Val.template get<VecTy*>()->push_back(RHS.front());
75
0
    } else {
76
0
      *Val.template get<VecTy*>() = *RHS.Val.template get<VecTy*>();
77
0
    }
78
0
    return *this;
79
0
  }
llvm::TinyPtrVector<llvm::DbgInfoIntrinsic*>::operator=(llvm::TinyPtrVector<llvm::DbgInfoIntrinsic*> const&)
Line
Count
Source
53
13
  TinyPtrVector &operator=(const TinyPtrVector &RHS) {
54
13
    if (this == &RHS)
55
0
      return *this;
56
13
    if (RHS.empty()) {
57
0
      this->clear();
58
0
      return *this;
59
0
    }
60
13
61
13
    // Try to squeeze into the single slot. If it won't fit, allocate a copied
62
13
    // vector.
63
13
    if (Val.template is<EltTy>()) {
64
13
      if (RHS.size() == 1)
65
13
        Val = RHS.front();
66
0
      else
67
0
        Val = new VecTy(*RHS.Val.template get<VecTy*>());
68
13
      return *this;
69
13
    }
70
0
71
0
    // If we have a full vector allocated, try to re-use it.
72
0
    if (RHS.Val.template is<EltTy>()) {
73
0
      Val.template get<VecTy*>()->clear();
74
0
      Val.template get<VecTy*>()->push_back(RHS.front());
75
0
    } else {
76
0
      *Val.template get<VecTy*>() = *RHS.Val.template get<VecTy*>();
77
0
    }
78
0
    return *this;
79
0
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::operator=(llvm::TinyPtrVector<clang::ParsedAttr*> const&)
Line
Count
Source
53
65.1k
  TinyPtrVector &operator=(const TinyPtrVector &RHS) {
54
65.1k
    if (this == &RHS)
55
0
      return *this;
56
65.1k
    if (RHS.empty()) {
57
63.9k
      this->clear();
58
63.9k
      return *this;
59
63.9k
    }
60
1.16k
61
1.16k
    // Try to squeeze into the single slot. If it won't fit, allocate a copied
62
1.16k
    // vector.
63
1.16k
    if (Val.template is<EltTy>()) {
64
1.16k
      if (RHS.size() == 1)
65
1.16k
        Val = RHS.front();
66
0
      else
67
0
        Val = new VecTy(*RHS.Val.template get<VecTy*>());
68
1.16k
      return *this;
69
1.16k
    }
70
0
71
0
    // If we have a full vector allocated, try to re-use it.
72
0
    if (RHS.Val.template is<EltTy>()) {
73
0
      Val.template get<VecTy*>()->clear();
74
0
      Val.template get<VecTy*>()->push_back(RHS.front());
75
0
    } else {
76
0
      *Val.template get<VecTy*>() = *RHS.Val.template get<VecTy*>();
77
0
    }
78
0
    return *this;
79
0
  }
80
81
114k
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
82
114k
    RHS.Val = (EltTy)nullptr;
83
114k
  }
Unexecuted instantiation: llvm::TinyPtrVector<llvm::BasicBlock*>::TinyPtrVector(llvm::TinyPtrVector<llvm::BasicBlock*>&&)
Unexecuted instantiation: llvm::TinyPtrVector<llvm::MCSymbol*>::TinyPtrVector(llvm::TinyPtrVector<llvm::MCSymbol*>&&)
Unexecuted instantiation: llvm::TinyPtrVector<llvm::Metadata*>::TinyPtrVector(llvm::TinyPtrVector<llvm::Metadata*>&&)
llvm::TinyPtrVector<llvm::Value*>::TinyPtrVector(llvm::TinyPtrVector<llvm::Value*>&&)
Line
Count
Source
81
138
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
82
138
    RHS.Val = (EltTy)nullptr;
83
138
  }
llvm::TinyPtrVector<llvm::PHINode*>::TinyPtrVector(llvm::TinyPtrVector<llvm::PHINode*>&&)
Line
Count
Source
81
57
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
82
57
    RHS.Val = (EltTy)nullptr;
83
57
  }
llvm::TinyPtrVector<llvm::DbgInfoIntrinsic*>::TinyPtrVector(llvm::TinyPtrVector<llvm::DbgInfoIntrinsic*>&&)
Line
Count
Source
81
352
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
82
352
    RHS.Val = (EltTy)nullptr;
83
352
  }
Unexecuted instantiation: llvm::TinyPtrVector<llvm::Instruction*>::TinyPtrVector(llvm::TinyPtrVector<llvm::Instruction*>&&)
Unexecuted instantiation: llvm::TinyPtrVector<llvm::AnalysisKey*>::TinyPtrVector(llvm::TinyPtrVector<llvm::AnalysisKey*>&&)
llvm::TinyPtrVector<llvm::DISubprogram const*>::TinyPtrVector(llvm::TinyPtrVector<llvm::DISubprogram const*>&&)
Line
Count
Source
81
124
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
82
124
    RHS.Val = (EltTy)nullptr;
83
124
  }
llvm::TinyPtrVector<int*>::TinyPtrVector(llvm::TinyPtrVector<int*>&&)
Line
Count
Source
81
8
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
82
8
    RHS.Val = (EltTy)nullptr;
83
8
  }
Unexecuted instantiation: llvm::TinyPtrVector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, llvm::TypeIdSummary> const*>::TinyPtrVector(llvm::TinyPtrVector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, llvm::TypeIdSummary> const*>&&)
Unexecuted instantiation: llvm::TinyPtrVector<clang::ObjCPropertyDecl*>::TinyPtrVector(llvm::TinyPtrVector<clang::ObjCPropertyDecl*>&&)
llvm::TinyPtrVector<clang::ParsedAttr*>::TinyPtrVector(llvm::TinyPtrVector<clang::ParsedAttr*>&&)
Line
Count
Source
81
971
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
82
971
    RHS.Val = (EltTy)nullptr;
83
971
  }
llvm::TinyPtrVector<void*>::TinyPtrVector(llvm::TinyPtrVector<void*>&&)
Line
Count
Source
81
1.46k
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
82
1.46k
    RHS.Val = (EltTy)nullptr;
83
1.46k
  }
llvm::TinyPtrVector<clang::serialization::ModuleFile*>::TinyPtrVector(llvm::TinyPtrVector<clang::serialization::ModuleFile*>&&)
Line
Count
Source
81
1.46k
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
82
1.46k
    RHS.Val = (EltTy)nullptr;
83
1.46k
  }
Unexecuted instantiation: llvm::TinyPtrVector<clang::NamedDecl*>::TinyPtrVector(llvm::TinyPtrVector<clang::NamedDecl*>&&)
Unexecuted instantiation: llvm::TinyPtrVector<clang::ParmVarDecl*>::TinyPtrVector(llvm::TinyPtrVector<clang::ParmVarDecl*>&&)
llvm::TinyPtrVector<clang::Module*>::TinyPtrVector(llvm::TinyPtrVector<clang::Module*>&&)
Line
Count
Source
81
235
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
82
235
    RHS.Val = (EltTy)nullptr;
83
235
  }
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::TinyPtrVector(llvm::TinyPtrVector<clang::CXXMethodDecl const*>&&)
Line
Count
Source
81
90.9k
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
82
90.9k
    RHS.Val = (EltTy)nullptr;
83
90.9k
  }
Unexecuted instantiation: llvm::TinyPtrVector<clang::CXXRecordDecl const*>::TinyPtrVector(llvm::TinyPtrVector<clang::CXXRecordDecl const*>&&)
llvm::TinyPtrVector<clang::ModuleMacro*>::TinyPtrVector(llvm::TinyPtrVector<clang::ModuleMacro*>&&)
Line
Count
Source
81
18.8k
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
82
18.8k
    RHS.Val = (EltTy)nullptr;
83
18.8k
  }
84
85
1.81M
  TinyPtrVector &operator=(TinyPtrVector &&RHS) {
86
1.81M
    if (this == &RHS)
87
0
      return *this;
88
1.81M
    if (RHS.empty()) {
89
1.81M
      this->clear();
90
1.81M
      return *this;
91
1.81M
    }
92
199
93
199
    // If this vector has been allocated on the heap, re-use it if cheap. If it
94
199
    // would require more copying, just delete it and we'll steal the other
95
199
    // side.
96
199
    if (VecTy *V = Val.template dyn_cast<VecTy*>()) {
97
0
      if (RHS.Val.template is<EltTy>()) {
98
0
        V->clear();
99
0
        V->push_back(RHS.front());
100
0
        RHS.Val = (EltTy)nullptr;
101
0
        return *this;
102
0
      }
103
0
      delete V;
104
0
    }
105
199
106
199
    Val = RHS.Val;
107
199
    RHS.Val = (EltTy)nullptr;
108
199
    return *this;
109
199
  }
Unexecuted instantiation: llvm::TinyPtrVector<llvm::AnalysisKey*>::operator=(llvm::TinyPtrVector<llvm::AnalysisKey*>&&)
Unexecuted instantiation: llvm::TinyPtrVector<llvm::MCSymbol*>::operator=(llvm::TinyPtrVector<llvm::MCSymbol*>&&)
llvm::TinyPtrVector<llvm::DbgInfoIntrinsic*>::operator=(llvm::TinyPtrVector<llvm::DbgInfoIntrinsic*>&&)
Line
Count
Source
85
1.81M
  TinyPtrVector &operator=(TinyPtrVector &&RHS) {
86
1.81M
    if (this == &RHS)
87
0
      return *this;
88
1.81M
    if (RHS.empty()) {
89
1.81M
      this->clear();
90
1.81M
      return *this;
91
1.81M
    }
92
112
93
112
    // If this vector has been allocated on the heap, re-use it if cheap. If it
94
112
    // would require more copying, just delete it and we'll steal the other
95
112
    // side.
96
112
    if (VecTy *V = Val.template dyn_cast<VecTy*>()) {
97
0
      if (RHS.Val.template is<EltTy>()) {
98
0
        V->clear();
99
0
        V->push_back(RHS.front());
100
0
        RHS.Val = (EltTy)nullptr;
101
0
        return *this;
102
0
      }
103
0
      delete V;
104
0
    }
105
112
106
112
    Val = RHS.Val;
107
112
    RHS.Val = (EltTy)nullptr;
108
112
    return *this;
109
112
  }
llvm::TinyPtrVector<llvm::Value*>::operator=(llvm::TinyPtrVector<llvm::Value*>&&)
Line
Count
Source
85
115
  TinyPtrVector &operator=(TinyPtrVector &&RHS) {
86
115
    if (this == &RHS)
87
0
      return *this;
88
115
    if (RHS.empty()) {
89
28
      this->clear();
90
28
      return *this;
91
28
    }
92
87
93
87
    // If this vector has been allocated on the heap, re-use it if cheap. If it
94
87
    // would require more copying, just delete it and we'll steal the other
95
87
    // side.
96
87
    if (VecTy *V = Val.template dyn_cast<VecTy*>()) {
97
0
      if (RHS.Val.template is<EltTy>()) {
98
0
        V->clear();
99
0
        V->push_back(RHS.front());
100
0
        RHS.Val = (EltTy)nullptr;
101
0
        return *this;
102
0
      }
103
0
      delete V;
104
0
    }
105
87
106
87
    Val = RHS.Val;
107
87
    RHS.Val = (EltTy)nullptr;
108
87
    return *this;
109
87
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::operator=(llvm::TinyPtrVector<clang::ParsedAttr*>&&)
Line
Count
Source
85
142
  TinyPtrVector &operator=(TinyPtrVector &&RHS) {
86
142
    if (this == &RHS)
87
0
      return *this;
88
142
    if (RHS.empty()) {
89
142
      this->clear();
90
142
      return *this;
91
142
    }
92
0
93
0
    // If this vector has been allocated on the heap, re-use it if cheap. If it
94
0
    // would require more copying, just delete it and we'll steal the other
95
0
    // side.
96
0
    if (VecTy *V = Val.template dyn_cast<VecTy*>()) {
97
0
      if (RHS.Val.template is<EltTy>()) {
98
0
        V->clear();
99
0
        V->push_back(RHS.front());
100
0
        RHS.Val = (EltTy)nullptr;
101
0
        return *this;
102
0
      }
103
0
      delete V;
104
0
    }
105
0
106
0
    Val = RHS.Val;
107
0
    RHS.Val = (EltTy)nullptr;
108
0
    return *this;
109
0
  }
110
111
  TinyPtrVector(std::initializer_list<EltTy> IL)
112
      : Val(IL.size() == 0
113
                ? PtrUnion()
114
                : IL.size() == 1 ? PtrUnion(*IL.begin())
115
130
                                 : PtrUnion(new VecTy(IL.begin(), IL.end()))) {}
116
117
  /// Constructor from an ArrayRef.
118
  ///
119
  /// This also is a constructor for individual array elements due to the single
120
  /// element constructor for ArrayRef.
121
  explicit TinyPtrVector(ArrayRef<EltTy> Elts)
122
      : Val(Elts.empty()
123
                ? PtrUnion()
124
                : Elts.size() == 1
125
                      ? PtrUnion(Elts[0])
126
                      : PtrUnion(new VecTy(Elts.begin(), Elts.end()))) {}
127
128
  TinyPtrVector(size_t Count, EltTy Value)
129
      : Val(Count == 0 ? PtrUnion()
130
                       : Count == 1 ? PtrUnion(Value)
131
                                    : PtrUnion(new VecTy(Count, Value))) {}
132
133
  // implicit conversion operator to ArrayRef.
134
13.5k
  operator ArrayRef<EltTy>() const {
135
13.5k
    if (Val.isNull())
136
0
      return None;
137
13.5k
    if (Val.template is<EltTy>())
138
13.4k
      return *Val.getAddrOfPtr1();
139
178
    return *Val.template get<VecTy*>();
140
178
  }
141
142
  // implicit conversion operator to MutableArrayRef.
143
57.6k
  operator MutableArrayRef<EltTy>() {
144
57.6k
    if (Val.isNull())
145
52.8k
      return None;
146
4.82k
    if (Val.template is<EltTy>())
147
4.43k
      return *Val.getAddrOfPtr1();
148
390
    return *Val.template get<VecTy*>();
149
390
  }
llvm::TinyPtrVector<llvm::MCSymbol*>::operator llvm::MutableArrayRef<llvm::MCSymbol*>()
Line
Count
Source
143
1.20k
  operator MutableArrayRef<EltTy>() {
144
1.20k
    if (Val.isNull())
145
0
      return None;
146
1.20k
    if (Val.template is<EltTy>())
147
1.20k
      return *Val.getAddrOfPtr1();
148
0
    return *Val.template get<VecTy*>();
149
0
  }
llvm::TinyPtrVector<llvm::Value*>::operator llvm::MutableArrayRef<llvm::Value*>()
Line
Count
Source
143
128
  operator MutableArrayRef<EltTy>() {
144
128
    if (Val.isNull())
145
0
      return None;
146
128
    if (Val.template is<EltTy>())
147
125
      return *Val.getAddrOfPtr1();
148
3
    return *Val.template get<VecTy*>();
149
3
  }
llvm::TinyPtrVector<clang::ModuleMacro*>::operator llvm::MutableArrayRef<clang::ModuleMacro*>()
Line
Count
Source
143
54.5k
  operator MutableArrayRef<EltTy>() {
144
54.5k
    if (Val.isNull())
145
52.8k
      return None;
146
1.78k
    if (Val.template is<EltTy>())
147
1.55k
      return *Val.getAddrOfPtr1();
148
231
    return *Val.template get<VecTy*>();
149
231
  }
llvm::TinyPtrVector<clang::Module*>::operator llvm::MutableArrayRef<clang::Module*>()
Line
Count
Source
143
1.70k
  operator MutableArrayRef<EltTy>() {
144
1.70k
    if (Val.isNull())
145
0
      return None;
146
1.70k
    if (Val.template is<EltTy>())
147
1.54k
      return *Val.getAddrOfPtr1();
148
155
    return *Val.template get<VecTy*>();
149
155
  }
llvm::TinyPtrVector<lld::elf::InputSection*>::operator llvm::MutableArrayRef<lld::elf::InputSection*>()
Line
Count
Source
143
25
  operator MutableArrayRef<EltTy>() {
144
25
    if (Val.isNull())
145
21
      return None;
146
4
    if (Val.template is<EltTy>())
147
3
      return *Val.getAddrOfPtr1();
148
1
    return *Val.template get<VecTy*>();
149
1
  }
150
151
  // Implicit conversion to ArrayRef<U> if EltTy* implicitly converts to U*.
152
  template<typename U,
153
           typename std::enable_if<
154
               std::is_convertible<ArrayRef<EltTy>, ArrayRef<U>>::value,
155
               bool>::type = false>
156
  operator ArrayRef<U>() const {
157
    return operator ArrayRef<EltTy>();
158
  }
159
160
103M
  bool empty() const {
161
103M
    // This vector can be empty if it contains no element, or if it
162
103M
    // contains a pointer to an empty vector.
163
103M
    if (Val.isNull()) 
return true97.3M
;
164
5.70M
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
165
4.04M
      return Vec->empty();
166
1.65M
    return false;
167
1.65M
  }
llvm::TinyPtrVector<llvm::AnalysisKey*>::empty() const
Line
Count
Source
160
271
  bool empty() const {
161
271
    // This vector can be empty if it contains no element, or if it
162
271
    // contains a pointer to an empty vector.
163
271
    if (Val.isNull()) 
return true232
;
164
39
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
165
0
      return Vec->empty();
166
39
    return false;
167
39
  }
llvm::TinyPtrVector<llvm::MCSymbol*>::empty() const
Line
Count
Source
160
1.20k
  bool empty() const {
161
1.20k
    // This vector can be empty if it contains no element, or if it
162
1.20k
    // contains a pointer to an empty vector.
163
1.20k
    if (Val.isNull()) 
return true507
;
164
698
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
165
0
      return Vec->empty();
166
698
    return false;
167
698
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::empty() const
Line
Count
Source
160
712
  bool empty() const {
161
712
    // This vector can be empty if it contains no element, or if it
162
712
    // contains a pointer to an empty vector.
163
712
    if (Val.isNull()) 
return true0
;
164
712
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
165
58
      return Vec->empty();
166
654
    return false;
167
654
  }
llvm::TinyPtrVector<llvm::DbgInfoIntrinsic*>::empty() const
Line
Count
Source
160
2.84M
  bool empty() const {
161
2.84M
    // This vector can be empty if it contains no element, or if it
162
2.84M
    // contains a pointer to an empty vector.
163
2.84M
    if (Val.isNull()) 
return true2.84M
;
164
283
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
165
2
      return Vec->empty();
166
281
    return false;
167
281
  }
llvm::TinyPtrVector<llvm::Value*>::empty() const
Line
Count
Source
160
238
  bool empty() const {
161
238
    // This vector can be empty if it contains no element, or if it
162
238
    // contains a pointer to an empty vector.
163
238
    if (Val.isNull()) 
return true60
;
164
178
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
165
8
      return Vec->empty();
166
170
    return false;
167
170
  }
llvm::TinyPtrVector<llvm::Instruction*>::empty() const
Line
Count
Source
160
6.99k
  bool empty() const {
161
6.99k
    // This vector can be empty if it contains no element, or if it
162
6.99k
    // contains a pointer to an empty vector.
163
6.99k
    if (Val.isNull()) 
return true0
;
164
6.99k
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
165
4.42k
      return Vec->empty();
166
2.57k
    return false;
167
2.57k
  }
llvm::TinyPtrVector<clang::ObjCPropertyDecl*>::empty() const
Line
Count
Source
160
112
  bool empty() const {
161
112
    // This vector can be empty if it contains no element, or if it
162
112
    // contains a pointer to an empty vector.
163
112
    if (Val.isNull()) 
return true0
;
164
112
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
165
18
      return Vec->empty();
166
94
    return false;
167
94
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::empty() const
Line
Count
Source
160
100M
  bool empty() const {
161
100M
    // This vector can be empty if it contains no element, or if it
162
100M
    // contains a pointer to an empty vector.
163
100M
    if (Val.isNull()) 
return true94.4M
;
164
5.58M
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
165
4.02M
      return Vec->empty();
166
1.55M
    return false;
167
1.55M
  }
llvm::TinyPtrVector<clang::serialization::ModuleFile*>::empty() const
Line
Count
Source
160
30.2k
  bool empty() const {
161
30.2k
    // This vector can be empty if it contains no element, or if it
162
30.2k
    // contains a pointer to an empty vector.
163
30.2k
    if (Val.isNull()) 
return true29.9k
;
164
330
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
165
330
      return Vec->empty();
166
0
    return false;
167
0
  }
llvm::TinyPtrVector<void*>::empty() const
Line
Count
Source
160
113k
  bool empty() const {
161
113k
    // This vector can be empty if it contains no element, or if it
162
113k
    // contains a pointer to an empty vector.
163
113k
    if (Val.isNull()) 
return true2.93k
;
164
110k
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
165
19.2k
      return Vec->empty();
166
91.5k
    return false;
167
91.5k
  }
llvm::TinyPtrVector<clang::ParmVarDecl*>::empty() const
Line
Count
Source
160
3
  bool empty() const {
161
3
    // This vector can be empty if it contains no element, or if it
162
3
    // contains a pointer to an empty vector.
163
3
    if (Val.isNull()) 
return true0
;
164
3
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
165
2
      return Vec->empty();
166
1
    return false;
167
1
  }
168
169
34.9k
  unsigned size() const {
170
34.9k
    if (empty())
171
0
      return 0;
172
34.9k
    if (Val.template is<EltTy>())
173
27.9k
      return 1;
174
6.97k
    return Val.template get<VecTy*>()->size();
175
6.97k
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::size() const
Line
Count
Source
169
707
  unsigned size() const {
170
707
    if (empty())
171
0
      return 0;
172
707
    if (Val.template is<EltTy>())
173
649
      return 1;
174
58
    return Val.template get<VecTy*>()->size();
175
58
  }
llvm::TinyPtrVector<llvm::DbgInfoIntrinsic*>::size() const
Line
Count
Source
169
13
  unsigned size() const {
170
13
    if (empty())
171
0
      return 0;
172
13
    if (Val.template is<EltTy>())
173
13
      return 1;
174
0
    return Val.template get<VecTy*>()->size();
175
0
  }
llvm::TinyPtrVector<llvm::Instruction*>::size() const
Line
Count
Source
169
2.67k
  unsigned size() const {
170
2.67k
    if (empty())
171
0
      return 0;
172
2.67k
    if (Val.template is<EltTy>())
173
1.28k
      return 1;
174
1.39k
    return Val.template get<VecTy*>()->size();
175
1.39k
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::size() const
Line
Count
Source
169
1.37k
  unsigned size() const {
170
1.37k
    if (empty())
171
0
      return 0;
172
1.37k
    if (Val.template is<EltTy>())
173
1.36k
      return 1;
174
9
    return Val.template get<VecTy*>()->size();
175
9
  }
llvm::TinyPtrVector<void*>::size() const
Line
Count
Source
169
30.1k
  unsigned size() const {
170
30.1k
    if (empty())
171
0
      return 0;
172
30.1k
    if (Val.template is<EltTy>())
173
24.6k
      return 1;
174
5.51k
    return Val.template get<VecTy*>()->size();
175
5.51k
  }
llvm::TinyPtrVector<clang::ParmVarDecl*>::size() const
Line
Count
Source
169
3
  unsigned size() const {
170
3
    if (empty())
171
0
      return 0;
172
3
    if (Val.template is<EltTy>())
173
1
      return 1;
174
2
    return Val.template get<VecTy*>()->size();
175
2
  }
176
177
  using iterator = EltTy *;
178
  using const_iterator = const EltTy *;
179
  using reverse_iterator = std::reverse_iterator<iterator>;
180
  using const_reverse_iterator = std::reverse_iterator<const_iterator>;
181
182
841M
  iterator begin() {
183
841M
    if (Val.template is<EltTy>())
184
827M
      return Val.getAddrOfPtr1();
185
13.9M
186
13.9M
    return Val.template get<VecTy *>()->begin();
187
13.9M
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::begin()
Line
Count
Source
182
835M
  iterator begin() {
183
835M
    if (Val.template is<EltTy>())
184
821M
      return Val.getAddrOfPtr1();
185
13.9M
186
13.9M
    return Val.template get<VecTy *>()->begin();
187
13.9M
  }
llvm::TinyPtrVector<llvm::AnalysisKey*>::begin()
Line
Count
Source
182
2.61k
  iterator begin() {
183
2.61k
    if (Val.template is<EltTy>())
184
2.61k
      return Val.getAddrOfPtr1();
185
0
186
0
    return Val.template get<VecTy *>()->begin();
187
0
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::begin()
Line
Count
Source
182
8.06k
  iterator begin() {
183
8.06k
    if (Val.template is<EltTy>())
184
8.00k
      return Val.getAddrOfPtr1();
185
66
186
66
    return Val.template get<VecTy *>()->begin();
187
66
  }
Unexecuted instantiation: llvm::TinyPtrVector<llvm::MCSymbol*>::begin()
llvm::TinyPtrVector<llvm::Metadata*>::begin()
Line
Count
Source
182
182
  iterator begin() {
183
182
    if (Val.template is<EltTy>())
184
182
      return Val.getAddrOfPtr1();
185
0
186
0
    return Val.template get<VecTy *>()->begin();
187
0
  }
llvm::TinyPtrVector<llvm::DbgInfoIntrinsic*>::begin()
Line
Count
Source
182
4.39M
  iterator begin() {
183
4.39M
    if (Val.template is<EltTy>())
184
4.39M
      return Val.getAddrOfPtr1();
185
5
186
5
    return Val.template get<VecTy *>()->begin();
187
5
  }
llvm::TinyPtrVector<llvm::Value*>::begin()
Line
Count
Source
182
61
  iterator begin() {
183
61
    if (Val.template is<EltTy>())
184
60
      return Val.getAddrOfPtr1();
185
1
186
1
    return Val.template get<VecTy *>()->begin();
187
1
  }
llvm::TinyPtrVector<llvm::PHINode*>::begin()
Line
Count
Source
182
171
  iterator begin() {
183
171
    if (Val.template is<EltTy>())
184
171
      return Val.getAddrOfPtr1();
185
0
186
0
    return Val.template get<VecTy *>()->begin();
187
0
  }
llvm::TinyPtrVector<llvm::Instruction*>::begin()
Line
Count
Source
182
1.41k
  iterator begin() {
183
1.41k
    if (Val.template is<EltTy>())
184
0
      return Val.getAddrOfPtr1();
185
1.41k
186
1.41k
    return Val.template get<VecTy *>()->begin();
187
1.41k
  }
llvm::TinyPtrVector<llvm::Function*>::begin()
Line
Count
Source
182
10
  iterator begin() {
183
10
    if (Val.template is<EltTy>())
184
6
      return Val.getAddrOfPtr1();
185
4
186
4
    return Val.template get<VecTy *>()->begin();
187
4
  }
llvm::TinyPtrVector<llvm::DISubprogram const*>::begin()
Line
Count
Source
182
121
  iterator begin() {
183
121
    if (Val.template is<EltTy>())
184
120
      return Val.getAddrOfPtr1();
185
1
186
1
    return Val.template get<VecTy *>()->begin();
187
1
  }
llvm::TinyPtrVector<int*>::begin()
Line
Count
Source
182
1.59k
  iterator begin() {
183
1.59k
    if (Val.template is<EltTy>())
184
114
      return Val.getAddrOfPtr1();
185
1.48k
186
1.48k
    return Val.template get<VecTy *>()->begin();
187
1.48k
  }
llvm::TinyPtrVector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, llvm::TypeIdSummary> const*>::begin()
Line
Count
Source
182
16
  iterator begin() {
183
16
    if (Val.template is<EltTy>())
184
16
      return Val.getAddrOfPtr1();
185
0
186
0
    return Val.template get<VecTy *>()->begin();
187
0
  }
llvm::TinyPtrVector<clang::ObjCPropertyDecl*>::begin()
Line
Count
Source
182
412
  iterator begin() {
183
412
    if (Val.template is<EltTy>())
184
376
      return Val.getAddrOfPtr1();
185
36
186
36
    return Val.template get<VecTy *>()->begin();
187
36
  }
llvm::TinyPtrVector<clang::serialization::ModuleFile*>::begin()
Line
Count
Source
182
12.1k
  iterator begin() {
183
12.1k
    if (Val.template is<EltTy>())
184
11.6k
      return Val.getAddrOfPtr1();
185
489
186
489
    return Val.template get<VecTy *>()->begin();
187
489
  }
llvm::TinyPtrVector<void*>::begin()
Line
Count
Source
182
157k
  iterator begin() {
183
157k
    if (Val.template is<EltTy>())
184
136k
      return Val.getAddrOfPtr1();
185
20.6k
186
20.6k
    return Val.template get<VecTy *>()->begin();
187
20.6k
  }
llvm::TinyPtrVector<clang::NamedDecl*>::begin()
Line
Count
Source
182
9.99k
  iterator begin() {
183
9.99k
    if (Val.template is<EltTy>())
184
8.68k
      return Val.getAddrOfPtr1();
185
1.30k
186
1.30k
    return Val.template get<VecTy *>()->begin();
187
1.30k
  }
llvm::TinyPtrVector<clang::Module*>::begin()
Line
Count
Source
182
1.34k
  iterator begin() {
183
1.34k
    if (Val.template is<EltTy>())
184
1.32k
      return Val.getAddrOfPtr1();
185
14
186
14
    return Val.template get<VecTy *>()->begin();
187
14
  }
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::begin()
Line
Count
Source
182
1.05M
  iterator begin() {
183
1.05M
    if (Val.template is<EltTy>())
184
1.05M
      return Val.getAddrOfPtr1();
185
6.18k
186
6.18k
    return Val.template get<VecTy *>()->begin();
187
6.18k
  }
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::begin()
Line
Count
Source
182
57.6k
  iterator begin() {
183
57.6k
    if (Val.template is<EltTy>())
184
53.6k
      return Val.getAddrOfPtr1();
185
4.01k
186
4.01k
    return Val.template get<VecTy *>()->begin();
187
4.01k
  }
llvm::TinyPtrVector<clang::ModuleMacro*>::begin()
Line
Count
Source
182
14.1k
  iterator begin() {
183
14.1k
    if (Val.template is<EltTy>())
184
13.6k
      return Val.getAddrOfPtr1();
185
558
186
558
    return Val.template get<VecTy *>()->begin();
187
558
  }
llvm::TinyPtrVector<lld::elf::InputSection*>::begin()
Line
Count
Source
182
629
  iterator begin() {
183
629
    if (Val.template is<EltTy>())
184
628
      return Val.getAddrOfPtr1();
185
1
186
1
    return Val.template get<VecTy *>()->begin();
187
1
  }
188
189
426M
  iterator end() {
190
426M
    if (Val.template is<EltTy>())
191
414M
      return begin() + (Val.isNull() ? 
0403M
:
110.9M
);
192
12.2M
193
12.2M
    return Val.template get<VecTy *>()->end();
194
12.2M
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::end()
Line
Count
Source
189
423M
  iterator end() {
190
423M
    if (Val.template is<EltTy>())
191
411M
      return begin() + (Val.isNull() ? 
0401M
:
110.3M
);
192
12.2M
193
12.2M
    return Val.template get<VecTy *>()->end();
194
12.2M
  }
llvm::TinyPtrVector<llvm::AnalysisKey*>::end()
Line
Count
Source
189
1.61k
  iterator end() {
190
1.61k
    if (Val.template is<EltTy>())
191
1.61k
      return begin() + (Val.isNull() ? 
0926
:
1691
);
192
0
193
0
    return Val.template get<VecTy *>()->end();
194
0
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::end()
Line
Count
Source
189
5.20k
  iterator end() {
190
5.20k
    if (Val.template is<EltTy>())
191
5.11k
      return begin() + (Val.isNull() ? 
03.54k
:
11.57k
);
192
87
193
87
    return Val.template get<VecTy *>()->end();
194
87
  }
Unexecuted instantiation: llvm::TinyPtrVector<llvm::MCSymbol*>::end()
llvm::TinyPtrVector<llvm::Metadata*>::end()
Line
Count
Source
189
91
  iterator end() {
190
91
    if (Val.template is<EltTy>())
191
91
      return begin() + (Val.isNull() ? 
026
:
165
);
192
0
193
0
    return Val.template get<VecTy *>()->end();
194
0
  }
llvm::TinyPtrVector<llvm::DbgInfoIntrinsic*>::end()
Line
Count
Source
189
2.19M
  iterator end() {
190
2.19M
    if (Val.template is<EltTy>())
191
2.19M
      return begin() + (Val.isNull() ? 
02.19M
:
1244
);
192
6
193
6
    return Val.template get<VecTy *>()->end();
194
6
  }
llvm::TinyPtrVector<llvm::Value*>::end()
Line
Count
Source
189
31
  iterator end() {
190
31
    if (Val.template is<EltTy>())
191
30
      return begin() + (Val.isNull() ? 
00
: 1);
192
1
193
1
    return Val.template get<VecTy *>()->end();
194
1
  }
llvm::TinyPtrVector<llvm::PHINode*>::end()
Line
Count
Source
189
114
  iterator end() {
190
114
    if (Val.template is<EltTy>())
191
114
      return begin() + (Val.isNull() ? 
00
: 1);
192
0
193
0
    return Val.template get<VecTy *>()->end();
194
0
  }
llvm::TinyPtrVector<llvm::Instruction*>::end()
Line
Count
Source
189
1.41k
  iterator end() {
190
1.41k
    if (Val.template is<EltTy>())
191
0
      return begin() + (Val.isNull() ? 0 : 1);
192
1.41k
193
1.41k
    return Val.template get<VecTy *>()->end();
194
1.41k
  }
llvm::TinyPtrVector<llvm::Function*>::end()
Line
Count
Source
189
7
  iterator end() {
190
7
    if (Val.template is<EltTy>())
191
3
      return begin() + (Val.isNull() ? 
00
: 1);
192
4
193
4
    return Val.template get<VecTy *>()->end();
194
4
  }
llvm::TinyPtrVector<llvm::DISubprogram const*>::end()
Line
Count
Source
189
61
  iterator end() {
190
61
    if (Val.template is<EltTy>())
191
60
      return begin() + (Val.isNull() ? 
00
: 1);
192
1
193
1
    return Val.template get<VecTy *>()->end();
194
1
  }
llvm::TinyPtrVector<int*>::end()
Line
Count
Source
189
179
  iterator end() {
190
179
    if (Val.template is<EltTy>())
191
52
      return begin() + (Val.isNull() ? 
028
:
124
);
192
127
193
127
    return Val.template get<VecTy *>()->end();
194
127
  }
llvm::TinyPtrVector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, llvm::TypeIdSummary> const*>::end()
Line
Count
Source
189
8
  iterator end() {
190
8
    if (Val.template is<EltTy>())
191
8
      return begin() + (Val.isNull() ? 
00
: 1);
192
0
193
0
    return Val.template get<VecTy *>()->end();
194
0
  }
llvm::TinyPtrVector<clang::ObjCPropertyDecl*>::end()
Line
Count
Source
189
224
  iterator end() {
190
224
    if (Val.template is<EltTy>())
191
188
      return begin() + (Val.isNull() ? 
00
: 1);
192
36
193
36
    return Val.template get<VecTy *>()->end();
194
36
  }
llvm::TinyPtrVector<clang::serialization::ModuleFile*>::end()
Line
Count
Source
189
12.2k
  iterator end() {
190
12.2k
    if (Val.template is<EltTy>())
191
11.6k
      return begin() + (Val.isNull() ? 0 : 
10
);
192
670
193
670
    return Val.template get<VecTy *>()->end();
194
670
  }
llvm::TinyPtrVector<void*>::end()
Line
Count
Source
189
41.6k
  iterator end() {
190
41.6k
    if (Val.template is<EltTy>())
191
34.7k
      return begin() + (Val.isNull() ? 
01.46k
:
133.2k
);
192
6.92k
193
6.92k
    return Val.template get<VecTy *>()->end();
194
6.92k
  }
llvm::TinyPtrVector<clang::NamedDecl*>::end()
Line
Count
Source
189
5.64k
  iterator end() {
190
5.64k
    if (Val.template is<EltTy>())
191
4.34k
      return begin() + (Val.isNull() ? 
00
: 1);
192
1.30k
193
1.30k
    return Val.template get<VecTy *>()->end();
194
1.30k
  }
llvm::TinyPtrVector<clang::Module*>::end()
Line
Count
Source
189
774
  iterator end() {
190
774
    if (Val.template is<EltTy>())
191
757
      return begin() + (Val.isNull() ? 
00
: 1);
192
17
193
17
    return Val.template get<VecTy *>()->end();
194
17
  }
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::end()
Line
Count
Source
189
532k
  iterator end() {
190
532k
    if (Val.template is<EltTy>())
191
526k
      return begin() + (Val.isNull() ? 
00
: 1);
192
6.18k
193
6.18k
    return Val.template get<VecTy *>()->end();
194
6.18k
  }
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::end()
Line
Count
Source
189
43.7k
  iterator end() {
190
43.7k
    if (Val.template is<EltTy>())
191
35.7k
      return begin() + (Val.isNull() ? 
023.4k
:
112.2k
);
192
8.02k
193
8.02k
    return Val.template get<VecTy *>()->end();
194
8.02k
  }
llvm::TinyPtrVector<clang::ModuleMacro*>::end()
Line
Count
Source
189
9.04k
  iterator end() {
190
9.04k
    if (Val.template is<EltTy>())
191
8.46k
      return begin() + (Val.isNull() ? 
06.05k
:
12.41k
);
192
573
193
573
    return Val.template get<VecTy *>()->end();
194
573
  }
llvm::TinyPtrVector<lld::elf::InputSection*>::end()
Line
Count
Source
189
315
  iterator end() {
190
315
    if (Val.template is<EltTy>())
191
314
      return begin() + (Val.isNull() ? 
0302
:
112
);
192
1
193
1
    return Val.template get<VecTy *>()->end();
194
1
  }
195
196
76.4M
  const_iterator begin() const {
197
76.4M
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
198
76.4M
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::begin() const
Line
Count
Source
196
75.8M
  const_iterator begin() const {
197
75.8M
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
198
75.8M
  }
llvm::TinyPtrVector<llvm::AnalysisKey*>::begin() const
Line
Count
Source
196
110
  const_iterator begin() const {
197
110
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
198
110
  }
llvm::TinyPtrVector<llvm::DbgInfoIntrinsic*>::begin() const
Line
Count
Source
196
21.6k
  const_iterator begin() const {
197
21.6k
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
198
21.6k
  }
llvm::TinyPtrVector<llvm::Function*>::begin() const
Line
Count
Source
196
7
  const_iterator begin() const {
197
7
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
198
7
  }
llvm::TinyPtrVector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, llvm::TypeIdSummary> const*>::begin() const
Line
Count
Source
196
8
  const_iterator begin() const {
197
8
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
198
8
  }
llvm::TinyPtrVector<void*>::begin() const
Line
Count
Source
196
80.6k
  const_iterator begin() const {
197
80.6k
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
198
80.6k
  }
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::begin() const
Line
Count
Source
196
532k
  const_iterator begin() const {
197
532k
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
198
532k
  }
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::begin() const
Line
Count
Source
196
2.00k
  const_iterator begin() const {
197
2.00k
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
198
2.00k
  }
199
200
79.8M
  const_iterator end() const {
201
79.8M
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
202
79.8M
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::end() const
Line
Count
Source
200
79.3M
  const_iterator end() const {
201
79.3M
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
202
79.3M
  }
llvm::TinyPtrVector<llvm::AnalysisKey*>::end() const
Line
Count
Source
200
110
  const_iterator end() const {
201
110
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
202
110
  }
llvm::TinyPtrVector<llvm::DbgInfoIntrinsic*>::end() const
Line
Count
Source
200
21.6k
  const_iterator end() const {
201
21.6k
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
202
21.6k
  }
llvm::TinyPtrVector<llvm::Function*>::end() const
Line
Count
Source
200
7
  const_iterator end() const {
201
7
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
202
7
  }
llvm::TinyPtrVector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, llvm::TypeIdSummary> const*>::end() const
Line
Count
Source
200
8
  const_iterator end() const {
201
8
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
202
8
  }
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::end() const
Line
Count
Source
200
532k
  const_iterator end() const {
201
532k
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
202
532k
  }
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::end() const
Line
Count
Source
200
4.00k
  const_iterator end() const {
201
4.00k
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
202
4.00k
  }
203
204
  reverse_iterator rbegin() { return reverse_iterator(end()); }
205
  reverse_iterator rend() { return reverse_iterator(begin()); }
206
207
  const_reverse_iterator rbegin() const {
208
    return const_reverse_iterator(end());
209
  }
210
211
  const_reverse_iterator rend() const {
212
    return const_reverse_iterator(begin());
213
  }
214
215
8
  EltTy operator[](unsigned i) const {
216
8
    assert(!Val.isNull() && "can't index into an empty vector");
217
8
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
218
1
      assert(i == 0 && "tinyvector index out of range");
219
1
      return V;
220
1
    }
221
7
222
7
    assert(i < Val.template get<VecTy*>()->size() &&
223
7
           "tinyvector index out of range");
224
7
    return (*Val.template get<VecTy*>())[i];
225
7
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::operator[](unsigned int) const
Line
Count
Source
215
3
  EltTy operator[](unsigned i) const {
216
3
    assert(!Val.isNull() && "can't index into an empty vector");
217
3
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
218
0
      assert(i == 0 && "tinyvector index out of range");
219
0
      return V;
220
0
    }
221
3
222
3
    assert(i < Val.template get<VecTy*>()->size() &&
223
3
           "tinyvector index out of range");
224
3
    return (*Val.template get<VecTy*>())[i];
225
3
  }
llvm::TinyPtrVector<clang::ParmVarDecl*>::operator[](unsigned int) const
Line
Count
Source
215
5
  EltTy operator[](unsigned i) const {
216
5
    assert(!Val.isNull() && "can't index into an empty vector");
217
5
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
218
1
      assert(i == 0 && "tinyvector index out of range");
219
1
      return V;
220
1
    }
221
4
222
4
    assert(i < Val.template get<VecTy*>()->size() &&
223
4
           "tinyvector index out of range");
224
4
    return (*Val.template get<VecTy*>())[i];
225
4
  }
226
227
2.05k
  EltTy front() const {
228
2.05k
    assert(!empty() && "vector empty");
229
2.05k
    if (EltTy V = Val.template dyn_cast<EltTy>())
230
2.02k
      return V;
231
29
    return Val.template get<VecTy*>()->front();
232
29
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::front() const
Line
Count
Source
227
652
  EltTy front() const {
228
652
    assert(!empty() && "vector empty");
229
652
    if (EltTy V = Val.template dyn_cast<EltTy>())
230
650
      return V;
231
2
    return Val.template get<VecTy*>()->front();
232
2
  }
Unexecuted instantiation: llvm::TinyPtrVector<llvm::AnalysisKey*>::front() const
Unexecuted instantiation: llvm::TinyPtrVector<llvm::MCSymbol*>::front() const
llvm::TinyPtrVector<llvm::DbgInfoIntrinsic*>::front() const
Line
Count
Source
227
162
  EltTy front() const {
228
162
    assert(!empty() && "vector empty");
229
162
    if (EltTy V = Val.template dyn_cast<EltTy>())
230
162
      return V;
231
0
    return Val.template get<VecTy*>()->front();
232
0
  }
Unexecuted instantiation: llvm::TinyPtrVector<llvm::Value*>::front() const
llvm::TinyPtrVector<clang::ObjCPropertyDecl*>::front() const
Line
Count
Source
227
79
  EltTy front() const {
228
79
    assert(!empty() && "vector empty");
229
79
    if (EltTy V = Val.template dyn_cast<EltTy>())
230
52
      return V;
231
27
    return Val.template get<VecTy*>()->front();
232
27
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::front() const
Line
Count
Source
227
1.16k
  EltTy front() const {
228
1.16k
    assert(!empty() && "vector empty");
229
1.16k
    if (EltTy V = Val.template dyn_cast<EltTy>())
230
1.16k
      return V;
231
0
    return Val.template get<VecTy*>()->front();
232
0
  }
233
234
  EltTy back() const {
235
    assert(!empty() && "vector empty");
236
    if (EltTy V = Val.template dyn_cast<EltTy>())
237
      return V;
238
    return Val.template get<VecTy*>()->back();
239
  }
240
241
11.5M
  void push_back(EltTy NewVal) {
242
11.5M
    assert(NewVal && "Can't add a null value");
243
11.5M
244
11.5M
    // If we have nothing, add something.
245
11.5M
    if (Val.isNull()) {
246
6.25M
      Val = NewVal;
247
6.25M
      return;
248
6.25M
    }
249
5.34M
250
5.34M
    // If we have a single value, convert to a vector.
251
5.34M
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
4.06M
      Val = new VecTy();
253
4.06M
      Val.template get<VecTy*>()->push_back(V);
254
4.06M
    }
255
5.34M
256
5.34M
    // Add the new value, we know we have a vector.
257
5.34M
    Val.template get<VecTy*>()->push_back(NewVal);
258
5.34M
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::push_back(llvm::BasicBlock*)
Line
Count
Source
241
1.82k
  void push_back(EltTy NewVal) {
242
1.82k
    assert(NewVal && "Can't add a null value");
243
1.82k
244
1.82k
    // If we have nothing, add something.
245
1.82k
    if (Val.isNull()) {
246
1.79k
      Val = NewVal;
247
1.79k
      return;
248
1.79k
    }
249
26
250
26
    // If we have a single value, convert to a vector.
251
26
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
22
      Val = new VecTy();
253
22
      Val.template get<VecTy*>()->push_back(V);
254
22
    }
255
26
256
26
    // Add the new value, we know we have a vector.
257
26
    Val.template get<VecTy*>()->push_back(NewVal);
258
26
  }
llvm::TinyPtrVector<llvm::MCSymbol*>::push_back(llvm::MCSymbol*)
Line
Count
Source
241
507
  void push_back(EltTy NewVal) {
242
507
    assert(NewVal && "Can't add a null value");
243
507
244
507
    // If we have nothing, add something.
245
507
    if (Val.isNull()) {
246
507
      Val = NewVal;
247
507
      return;
248
507
    }
249
0
250
0
    // If we have a single value, convert to a vector.
251
0
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
0
      Val = new VecTy();
253
0
      Val.template get<VecTy*>()->push_back(V);
254
0
    }
255
0
256
0
    // Add the new value, we know we have a vector.
257
0
    Val.template get<VecTy*>()->push_back(NewVal);
258
0
  }
llvm::TinyPtrVector<llvm::Metadata*>::push_back(llvm::Metadata*)
Line
Count
Source
241
77
  void push_back(EltTy NewVal) {
242
77
    assert(NewVal && "Can't add a null value");
243
77
244
77
    // If we have nothing, add something.
245
77
    if (Val.isNull()) {
246
77
      Val = NewVal;
247
77
      return;
248
77
    }
249
0
250
0
    // If we have a single value, convert to a vector.
251
0
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
0
      Val = new VecTy();
253
0
      Val.template get<VecTy*>()->push_back(V);
254
0
    }
255
0
256
0
    // Add the new value, we know we have a vector.
257
0
    Val.template get<VecTy*>()->push_back(NewVal);
258
0
  }
llvm::TinyPtrVector<llvm::Value*>::push_back(llvm::Value*)
Line
Count
Source
241
167
  void push_back(EltTy NewVal) {
242
167
    assert(NewVal && "Can't add a null value");
243
167
244
167
    // If we have nothing, add something.
245
167
    if (Val.isNull()) {
246
160
      Val = NewVal;
247
160
      return;
248
160
    }
249
7
250
7
    // If we have a single value, convert to a vector.
251
7
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
5
      Val = new VecTy();
253
5
      Val.template get<VecTy*>()->push_back(V);
254
5
    }
255
7
256
7
    // Add the new value, we know we have a vector.
257
7
    Val.template get<VecTy*>()->push_back(NewVal);
258
7
  }
llvm::TinyPtrVector<llvm::PHINode*>::push_back(llvm::PHINode*)
Line
Count
Source
241
57
  void push_back(EltTy NewVal) {
242
57
    assert(NewVal && "Can't add a null value");
243
57
244
57
    // If we have nothing, add something.
245
57
    if (Val.isNull()) {
246
57
      Val = NewVal;
247
57
      return;
248
57
    }
249
0
250
0
    // If we have a single value, convert to a vector.
251
0
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
0
      Val = new VecTy();
253
0
      Val.template get<VecTy*>()->push_back(V);
254
0
    }
255
0
256
0
    // Add the new value, we know we have a vector.
257
0
    Val.template get<VecTy*>()->push_back(NewVal);
258
0
  }
llvm::TinyPtrVector<llvm::DbgInfoIntrinsic*>::push_back(llvm::DbgInfoIntrinsic*)
Line
Count
Source
241
265
  void push_back(EltTy NewVal) {
242
265
    assert(NewVal && "Can't add a null value");
243
265
244
265
    // If we have nothing, add something.
245
265
    if (Val.isNull()) {
246
263
      Val = NewVal;
247
263
      return;
248
263
    }
249
2
250
2
    // If we have a single value, convert to a vector.
251
2
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
2
      Val = new VecTy();
253
2
      Val.template get<VecTy*>()->push_back(V);
254
2
    }
255
2
256
2
    // Add the new value, we know we have a vector.
257
2
    Val.template get<VecTy*>()->push_back(NewVal);
258
2
  }
llvm::TinyPtrVector<llvm::Instruction*>::push_back(llvm::Instruction*)
Line
Count
Source
241
4.31k
  void push_back(EltTy NewVal) {
242
4.31k
    assert(NewVal && "Can't add a null value");
243
4.31k
244
4.31k
    // If we have nothing, add something.
245
4.31k
    if (Val.isNull()) {
246
2.67k
      Val = NewVal;
247
2.67k
      return;
248
2.67k
    }
249
1.63k
250
1.63k
    // If we have a single value, convert to a vector.
251
1.63k
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
1.39k
      Val = new VecTy();
253
1.39k
      Val.template get<VecTy*>()->push_back(V);
254
1.39k
    }
255
1.63k
256
1.63k
    // Add the new value, we know we have a vector.
257
1.63k
    Val.template get<VecTy*>()->push_back(NewVal);
258
1.63k
  }
llvm::TinyPtrVector<llvm::Function*>::push_back(llvm::Function*)
Line
Count
Source
241
11
  void push_back(EltTy NewVal) {
242
11
    assert(NewVal && "Can't add a null value");
243
11
244
11
    // If we have nothing, add something.
245
11
    if (Val.isNull()) {
246
7
      Val = NewVal;
247
7
      return;
248
7
    }
249
4
250
4
    // If we have a single value, convert to a vector.
251
4
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
4
      Val = new VecTy();
253
4
      Val.template get<VecTy*>()->push_back(V);
254
4
    }
255
4
256
4
    // Add the new value, we know we have a vector.
257
4
    Val.template get<VecTy*>()->push_back(NewVal);
258
4
  }
llvm::TinyPtrVector<llvm::DISubprogram const*>::push_back(llvm::DISubprogram const*)
Line
Count
Source
241
63
  void push_back(EltTy NewVal) {
242
63
    assert(NewVal && "Can't add a null value");
243
63
244
63
    // If we have nothing, add something.
245
63
    if (Val.isNull()) {
246
62
      Val = NewVal;
247
62
      return;
248
62
    }
249
1
250
1
    // If we have a single value, convert to a vector.
251
1
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
1
      Val = new VecTy();
253
1
      Val.template get<VecTy*>()->push_back(V);
254
1
    }
255
1
256
1
    // Add the new value, we know we have a vector.
257
1
    Val.template get<VecTy*>()->push_back(NewVal);
258
1
  }
llvm::TinyPtrVector<int*>::push_back(int*)
Line
Count
Source
241
994
  void push_back(EltTy NewVal) {
242
994
    assert(NewVal && "Can't add a null value");
243
994
244
994
    // If we have nothing, add something.
245
994
    if (Val.isNull()) {
246
36
      Val = NewVal;
247
36
      return;
248
36
    }
249
958
250
958
    // If we have a single value, convert to a vector.
251
958
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
17
      Val = new VecTy();
253
17
      Val.template get<VecTy*>()->push_back(V);
254
17
    }
255
958
256
958
    // Add the new value, we know we have a vector.
257
958
    Val.template get<VecTy*>()->push_back(NewVal);
258
958
  }
llvm::TinyPtrVector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, llvm::TypeIdSummary> const*>::push_back(std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, llvm::TypeIdSummary> const*)
Line
Count
Source
241
8
  void push_back(EltTy NewVal) {
242
8
    assert(NewVal && "Can't add a null value");
243
8
244
8
    // If we have nothing, add something.
245
8
    if (Val.isNull()) {
246
8
      Val = NewVal;
247
8
      return;
248
8
    }
249
0
250
0
    // If we have a single value, convert to a vector.
251
0
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
0
      Val = new VecTy();
253
0
      Val.template get<VecTy*>()->push_back(V);
254
0
    }
255
0
256
0
    // Add the new value, we know we have a vector.
257
0
    Val.template get<VecTy*>()->push_back(NewVal);
258
0
  }
llvm::TinyPtrVector<clang::ObjCPropertyDecl*>::push_back(clang::ObjCPropertyDecl*)
Line
Count
Source
241
130
  void push_back(EltTy NewVal) {
242
130
    assert(NewVal && "Can't add a null value");
243
130
244
130
    // If we have nothing, add something.
245
130
    if (Val.isNull()) {
246
112
      Val = NewVal;
247
112
      return;
248
112
    }
249
18
250
18
    // If we have a single value, convert to a vector.
251
18
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
18
      Val = new VecTy();
253
18
      Val.template get<VecTy*>()->push_back(V);
254
18
    }
255
18
256
18
    // Add the new value, we know we have a vector.
257
18
    Val.template get<VecTy*>()->push_back(NewVal);
258
18
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::push_back(clang::ParsedAttr*)
Line
Count
Source
241
11.4M
  void push_back(EltTy NewVal) {
242
11.4M
    assert(NewVal && "Can't add a null value");
243
11.4M
244
11.4M
    // If we have nothing, add something.
245
11.4M
    if (Val.isNull()) {
246
6.12M
      Val = NewVal;
247
6.12M
      return;
248
6.12M
    }
249
5.32M
250
5.32M
    // If we have a single value, convert to a vector.
251
5.32M
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
4.05M
      Val = new VecTy();
253
4.05M
      Val.template get<VecTy*>()->push_back(V);
254
4.05M
    }
255
5.32M
256
5.32M
    // Add the new value, we know we have a vector.
257
5.32M
    Val.template get<VecTy*>()->push_back(NewVal);
258
5.32M
  }
llvm::TinyPtrVector<void*>::push_back(void*)
Line
Count
Source
241
12.2k
  void push_back(EltTy NewVal) {
242
12.2k
    assert(NewVal && "Can't add a null value");
243
12.2k
244
12.2k
    // If we have nothing, add something.
245
12.2k
    if (Val.isNull()) {
246
9.84k
      Val = NewVal;
247
9.84k
      return;
248
9.84k
    }
249
2.43k
250
2.43k
    // If we have a single value, convert to a vector.
251
2.43k
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
1.25k
      Val = new VecTy();
253
1.25k
      Val.template get<VecTy*>()->push_back(V);
254
1.25k
    }
255
2.43k
256
2.43k
    // Add the new value, we know we have a vector.
257
2.43k
    Val.template get<VecTy*>()->push_back(NewVal);
258
2.43k
  }
llvm::TinyPtrVector<clang::NamedDecl*>::push_back(clang::NamedDecl*)
Line
Count
Source
241
14.1k
  void push_back(EltTy NewVal) {
242
14.1k
    assert(NewVal && "Can't add a null value");
243
14.1k
244
14.1k
    // If we have nothing, add something.
245
14.1k
    if (Val.isNull()) {
246
8.75k
      Val = NewVal;
247
8.75k
      return;
248
8.75k
    }
249
5.40k
250
5.40k
    // If we have a single value, convert to a vector.
251
5.40k
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
4.21k
      Val = new VecTy();
253
4.21k
      Val.template get<VecTy*>()->push_back(V);
254
4.21k
    }
255
5.40k
256
5.40k
    // Add the new value, we know we have a vector.
257
5.40k
    Val.template get<VecTy*>()->push_back(NewVal);
258
5.40k
  }
llvm::TinyPtrVector<clang::ParmVarDecl*>::push_back(clang::ParmVarDecl*)
Line
Count
Source
241
5
  void push_back(EltTy NewVal) {
242
5
    assert(NewVal && "Can't add a null value");
243
5
244
5
    // If we have nothing, add something.
245
5
    if (Val.isNull()) {
246
3
      Val = NewVal;
247
3
      return;
248
3
    }
249
2
250
2
    // If we have a single value, convert to a vector.
251
2
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
2
      Val = new VecTy();
253
2
      Val.template get<VecTy*>()->push_back(V);
254
2
    }
255
2
256
2
    // Add the new value, we know we have a vector.
257
2
    Val.template get<VecTy*>()->push_back(NewVal);
258
2
  }
llvm::TinyPtrVector<clang::Module*>::push_back(clang::Module*)
Line
Count
Source
241
636
  void push_back(EltTy NewVal) {
242
636
    assert(NewVal && "Can't add a null value");
243
636
244
636
    // If we have nothing, add something.
245
636
    if (Val.isNull()) {
246
526
      Val = NewVal;
247
526
      return;
248
526
    }
249
110
250
110
    // If we have a single value, convert to a vector.
251
110
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
102
      Val = new VecTy();
253
102
      Val.template get<VecTy*>()->push_back(V);
254
102
    }
255
110
256
110
    // Add the new value, we know we have a vector.
257
110
    Val.template get<VecTy*>()->push_back(NewVal);
258
110
  }
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::push_back(clang::CXXMethodDecl const*)
Line
Count
Source
241
87.8k
  void push_back(EltTy NewVal) {
242
87.8k
    assert(NewVal && "Can't add a null value");
243
87.8k
244
87.8k
    // If we have nothing, add something.
245
87.8k
    if (Val.isNull()) {
246
87.1k
      Val = NewVal;
247
87.1k
      return;
248
87.1k
    }
249
722
250
722
    // If we have a single value, convert to a vector.
251
722
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
537
      Val = new VecTy();
253
537
      Val.template get<VecTy*>()->push_back(V);
254
537
    }
255
722
256
722
    // Add the new value, we know we have a vector.
257
722
    Val.template get<VecTy*>()->push_back(NewVal);
258
722
  }
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::push_back(clang::CXXRecordDecl const*)
Line
Count
Source
241
19.8k
  void push_back(EltTy NewVal) {
242
19.8k
    assert(NewVal && "Can't add a null value");
243
19.8k
244
19.8k
    // If we have nothing, add something.
245
19.8k
    if (Val.isNull()) {
246
11.7k
      Val = NewVal;
247
11.7k
      return;
248
11.7k
    }
249
8.14k
250
8.14k
    // If we have a single value, convert to a vector.
251
8.14k
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
4.30k
      Val = new VecTy();
253
4.30k
      Val.template get<VecTy*>()->push_back(V);
254
4.30k
    }
255
8.14k
256
8.14k
    // Add the new value, we know we have a vector.
257
8.14k
    Val.template get<VecTy*>()->push_back(NewVal);
258
8.14k
  }
llvm::TinyPtrVector<clang::ModuleMacro*>::push_back(clang::ModuleMacro*)
Line
Count
Source
241
15.5k
  void push_back(EltTy NewVal) {
242
15.5k
    assert(NewVal && "Can't add a null value");
243
15.5k
244
15.5k
    // If we have nothing, add something.
245
15.5k
    if (Val.isNull()) {
246
14.8k
      Val = NewVal;
247
14.8k
      return;
248
14.8k
    }
249
683
250
683
    // If we have a single value, convert to a vector.
251
683
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
467
      Val = new VecTy();
253
467
      Val.template get<VecTy*>()->push_back(V);
254
467
    }
255
683
256
683
    // Add the new value, we know we have a vector.
257
683
    Val.template get<VecTy*>()->push_back(NewVal);
258
683
  }
llvm::TinyPtrVector<llvm::AnalysisKey*>::push_back(llvm::AnalysisKey*)
Line
Count
Source
241
347
  void push_back(EltTy NewVal) {
242
347
    assert(NewVal && "Can't add a null value");
243
347
244
347
    // If we have nothing, add something.
245
347
    if (Val.isNull()) {
246
347
      Val = NewVal;
247
347
      return;
248
347
    }
249
0
250
0
    // If we have a single value, convert to a vector.
251
0
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
0
      Val = new VecTy();
253
0
      Val.template get<VecTy*>()->push_back(V);
254
0
    }
255
0
256
0
    // Add the new value, we know we have a vector.
257
0
    Val.template get<VecTy*>()->push_back(NewVal);
258
0
  }
llvm::TinyPtrVector<lld::elf::InputSection*>::push_back(lld::elf::InputSection*)
Line
Count
Source
241
119
  void push_back(EltTy NewVal) {
242
119
    assert(NewVal && "Can't add a null value");
243
119
244
119
    // If we have nothing, add something.
245
119
    if (Val.isNull()) {
246
116
      Val = NewVal;
247
116
      return;
248
116
    }
249
3
250
3
    // If we have a single value, convert to a vector.
251
3
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
3
      Val = new VecTy();
253
3
      Val.template get<VecTy*>()->push_back(V);
254
3
    }
255
3
256
3
    // Add the new value, we know we have a vector.
257
3
    Val.template get<VecTy*>()->push_back(NewVal);
258
3
  }
259
260
  void pop_back() {
261
    // If we have a single value, convert to empty.
262
    if (Val.template is<EltTy>())
263
      Val = (EltTy)nullptr;
264
    else if (VecTy *Vec = Val.template get<VecTy*>())
265
      Vec->pop_back();
266
  }
267
268
143M
  void clear() {
269
143M
    // If we have a single value, convert to empty.
270
143M
    if (Val.template is<EltTy>()) {
271
143M
      Val = (EltTy)nullptr;
272
143M
    } else 
if (VecTy *375k
Vec375k
= Val.template dyn_cast<VecTy*>()) {
273
375k
      // If we have a vector form, just clear it.
274
375k
      Vec->clear();
275
375k
    }
276
143M
    // Otherwise, we're already empty.
277
143M
  }
Unexecuted instantiation: llvm::TinyPtrVector<llvm::AnalysisKey*>::clear()
Unexecuted instantiation: llvm::TinyPtrVector<llvm::MCSymbol*>::clear()
Unexecuted instantiation: llvm::TinyPtrVector<llvm::BasicBlock*>::clear()
llvm::TinyPtrVector<llvm::DbgInfoIntrinsic*>::clear()
Line
Count
Source
268
2.68M
  void clear() {
269
2.68M
    // If we have a single value, convert to empty.
270
2.68M
    if (Val.template is<EltTy>()) {
271
2.68M
      Val = (EltTy)nullptr;
272
2.68M
    } else 
if (VecTy *2
Vec2
= Val.template dyn_cast<VecTy*>()) {
273
0
      // If we have a vector form, just clear it.
274
0
      Vec->clear();
275
0
    }
276
2.68M
    // Otherwise, we're already empty.
277
2.68M
  }
llvm::TinyPtrVector<llvm::Value*>::clear()
Line
Count
Source
268
28
  void clear() {
269
28
    // If we have a single value, convert to empty.
270
28
    if (Val.template is<EltTy>()) {
271
28
      Val = (EltTy)nullptr;
272
28
    } else 
if (VecTy *0
Vec0
= Val.template dyn_cast<VecTy*>()) {
273
0
      // If we have a vector form, just clear it.
274
0
      Vec->clear();
275
0
    }
276
28
    // Otherwise, we're already empty.
277
28
  }
llvm::TinyPtrVector<llvm::Instruction*>::clear()
Line
Count
Source
268
2.67k
  void clear() {
269
2.67k
    // If we have a single value, convert to empty.
270
2.67k
    if (Val.template is<EltTy>()) {
271
1.28k
      Val = (EltTy)nullptr;
272
1.39k
    } else if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) {
273
1.39k
      // If we have a vector form, just clear it.
274
1.39k
      Vec->clear();
275
1.39k
    }
276
2.67k
    // Otherwise, we're already empty.
277
2.67k
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::clear()
Line
Count
Source
268
141M
  void clear() {
269
141M
    // If we have a single value, convert to empty.
270
141M
    if (Val.template is<EltTy>()) {
271
140M
      Val = (EltTy)nullptr;
272
140M
    } else 
if (VecTy *372k
Vec372k
= Val.template dyn_cast<VecTy*>()) {
273
372k
      // If we have a vector form, just clear it.
274
372k
      Vec->clear();
275
372k
    }
276
141M
    // Otherwise, we're already empty.
277
141M
  }
llvm::TinyPtrVector<clang::serialization::ModuleFile*>::clear()
Line
Count
Source
268
39
  void clear() {
269
39
    // If we have a single value, convert to empty.
270
39
    if (Val.template is<EltTy>()) {
271
0
      Val = (EltTy)nullptr;
272
39
    } else if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) {
273
39
      // If we have a vector form, just clear it.
274
39
      Vec->clear();
275
39
    }
276
39
    // Otherwise, we're already empty.
277
39
  }
llvm::TinyPtrVector<void*>::clear()
Line
Count
Source
268
12.7k
  void clear() {
269
12.7k
    // If we have a single value, convert to empty.
270
12.7k
    if (Val.template is<EltTy>()) {
271
11.5k
      Val = (EltTy)nullptr;
272
11.5k
    } else 
if (VecTy *1.29k
Vec1.29k
= Val.template dyn_cast<VecTy*>()) {
273
1.29k
      // If we have a vector form, just clear it.
274
1.29k
      Vec->clear();
275
1.29k
    }
276
12.7k
    // Otherwise, we're already empty.
277
12.7k
  }
llvm::TinyPtrVector<clang::ModuleMacro*>::clear()
Line
Count
Source
268
4.41k
  void clear() {
269
4.41k
    // If we have a single value, convert to empty.
270
4.41k
    if (Val.template is<EltTy>()) {
271
4.39k
      Val = (EltTy)nullptr;
272
4.39k
    } else 
if (VecTy *23
Vec23
= Val.template dyn_cast<VecTy*>()) {
273
23
      // If we have a vector form, just clear it.
274
23
      Vec->clear();
275
23
    }
276
4.41k
    // Otherwise, we're already empty.
277
4.41k
  }
278
279
28.4k
  iterator erase(iterator I) {
280
28.4k
    assert(I >= begin() && "Iterator to erase is out of bounds.");
281
28.4k
    assert(I < end() && "Erasing at past-the-end iterator.");
282
28.4k
283
28.4k
    // If we have a single value, convert to empty.
284
28.4k
    if (Val.template is<EltTy>()) {
285
25.0k
      if (I == begin())
286
25.0k
        Val = (EltTy)nullptr;
287
25.0k
    } else 
if (VecTy *3.34k
Vec3.34k
= Val.template dyn_cast<VecTy*>()) {
288
3.34k
      // multiple items in a vector; just do the erase, there is no
289
3.34k
      // benefit to collapsing back to a pointer
290
3.34k
      return Vec->erase(I);
291
3.34k
    }
292
25.0k
    return end();
293
25.0k
  }
294
295
730
  iterator erase(iterator S, iterator E) {
296
730
    assert(S >= begin() && "Range to erase is out of bounds.");
297
730
    assert(S <= E && "Trying to erase invalid range.");
298
730
    assert(E <= end() && "Trying to erase past the end.");
299
730
300
730
    if (Val.template is<EltTy>()) {
301
627
      if (S == begin() && 
S != E401
)
302
401
        Val = (EltTy)nullptr;
303
627
    } else 
if (VecTy *103
Vec103
= Val.template dyn_cast<VecTy*>()) {
304
103
      return Vec->erase(S, E);
305
103
    }
306
627
    return end();
307
627
  }
llvm::TinyPtrVector<llvm::AnalysisKey*>::erase(llvm::AnalysisKey**, llvm::AnalysisKey**)
Line
Count
Source
295
271
  iterator erase(iterator S, iterator E) {
296
271
    assert(S >= begin() && "Range to erase is out of bounds.");
297
271
    assert(S <= E && "Trying to erase invalid range.");
298
271
    assert(E <= end() && "Trying to erase past the end.");
299
271
300
271
    if (Val.template is<EltTy>()) {
301
271
      if (S == begin() && 
S != E232
)
302
232
        Val = (EltTy)nullptr;
303
271
    } else 
if (VecTy *0
Vec0
= Val.template dyn_cast<VecTy*>()) {
304
0
      return Vec->erase(S, E);
305
0
    }
306
271
    return end();
307
271
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::erase(llvm::BasicBlock**, llvm::BasicBlock**)
Line
Count
Source
295
25
  iterator erase(iterator S, iterator E) {
296
25
    assert(S >= begin() && "Range to erase is out of bounds.");
297
25
    assert(S <= E && "Trying to erase invalid range.");
298
25
    assert(E <= end() && "Trying to erase past the end.");
299
25
300
25
    if (Val.template is<EltTy>()) {
301
0
      if (S == begin() && S != E)
302
0
        Val = (EltTy)nullptr;
303
25
    } else if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) {
304
25
      return Vec->erase(S, E);
305
25
    }
306
0
    return end();
307
0
  }
llvm::TinyPtrVector<void*>::erase(void**, void**)
Line
Count
Source
295
39
  iterator erase(iterator S, iterator E) {
296
39
    assert(S >= begin() && "Range to erase is out of bounds.");
297
39
    assert(S <= E && "Trying to erase invalid range.");
298
39
    assert(E <= end() && "Trying to erase past the end.");
299
39
300
39
    if (Val.template is<EltTy>()) {
301
0
      if (S == begin() && S != E)
302
0
        Val = (EltTy)nullptr;
303
39
    } else if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) {
304
39
      return Vec->erase(S, E);
305
39
    }
306
0
    return end();
307
0
  }
llvm::TinyPtrVector<clang::Module*>::erase(clang::Module**, clang::Module**)
Line
Count
Source
295
190
  iterator erase(iterator S, iterator E) {
296
190
    assert(S >= begin() && "Range to erase is out of bounds.");
297
190
    assert(S <= E && "Trying to erase invalid range.");
298
190
    assert(E <= end() && "Trying to erase past the end.");
299
190
300
190
    if (Val.template is<EltTy>()) {
301
187
      if (S == begin() && 
S != E0
)
302
0
        Val = (EltTy)nullptr;
303
187
    } else 
if (VecTy *3
Vec3
= Val.template dyn_cast<VecTy*>()) {
304
3
      return Vec->erase(S, E);
305
3
    }
306
187
    return end();
307
187
  }
llvm::TinyPtrVector<clang::ModuleMacro*>::erase(clang::ModuleMacro**, clang::ModuleMacro**)
Line
Count
Source
295
205
  iterator erase(iterator S, iterator E) {
296
205
    assert(S >= begin() && "Range to erase is out of bounds.");
297
205
    assert(S <= E && "Trying to erase invalid range.");
298
205
    assert(E <= end() && "Trying to erase past the end.");
299
205
300
205
    if (Val.template is<EltTy>()) {
301
169
      if (S == begin() && S != E)
302
169
        Val = (EltTy)nullptr;
303
169
    } else 
if (VecTy *36
Vec36
= Val.template dyn_cast<VecTy*>()) {
304
36
      return Vec->erase(S, E);
305
36
    }
306
169
    return end();
307
169
  }
308
309
6.37M
  iterator insert(iterator I, const EltTy &Elt) {
310
6.37M
    assert(I >= this->begin() && "Insertion iterator is out of bounds.");
311
6.37M
    assert(I <= this->end() && "Inserting past the end of the vector.");
312
6.37M
    if (I == end()) {
313
3.09M
      push_back(Elt);
314
3.09M
      return std::prev(end());
315
3.09M
    }
316
3.28M
    assert(!Val.isNull() && "Null value with non-end insert iterator.");
317
3.28M
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
318
2.02M
      assert(I == begin());
319
2.02M
      Val = Elt;
320
2.02M
      push_back(V);
321
2.02M
      return begin();
322
2.02M
    }
323
1.25M
324
1.25M
    return Val.template get<VecTy*>()->insert(I, Elt);
325
1.25M
  }
326
327
  template<typename ItTy>
328
67.9M
  iterator insert(iterator I, ItTy From, ItTy To) {
329
67.9M
    assert(I >= this->begin() && "Insertion iterator is out of bounds.");
330
67.9M
    assert(I <= this->end() && "Inserting past the end of the vector.");
331
67.9M
    if (From == To)
332
67.0M
      return I;
333
883k
334
883k
    // If we have a single value, convert to a vector.
335
883k
    ptrdiff_t Offset = I - begin();
336
883k
    if (Val.isNull()) {
337
854k
      if (std::next(From) == To) {
338
713k
        Val = *From;
339
713k
        return begin();
340
713k
      }
341
141k
342
141k
      Val = new VecTy();
343
141k
    } else 
if (EltTy 28.9k
V28.9k
= Val.template dyn_cast<EltTy>()) {
344
17.7k
      Val = new VecTy();
345
17.7k
      Val.template get<VecTy*>()->push_back(V);
346
17.7k
    }
347
883k
    
return Val.template get<VecTy*>()->insert(begin() + Offset, From, To)170k
;
348
883k
  }
Unexecuted instantiation: llvm::MCSymbol** llvm::TinyPtrVector<llvm::MCSymbol*>::insert<llvm::MCSymbol**>(llvm::MCSymbol**, llvm::MCSymbol**, llvm::MCSymbol**)
clang::ParsedAttr** llvm::TinyPtrVector<clang::ParsedAttr*>::insert<clang::ParsedAttr**>(clang::ParsedAttr**, clang::ParsedAttr**, clang::ParsedAttr**)
Line
Count
Source
328
67.8M
  iterator insert(iterator I, ItTy From, ItTy To) {
329
67.8M
    assert(I >= this->begin() && "Insertion iterator is out of bounds.");
330
67.8M
    assert(I <= this->end() && "Inserting past the end of the vector.");
331
67.8M
    if (From == To)
332
67.0M
      return I;
333
883k
334
883k
    // If we have a single value, convert to a vector.
335
883k
    ptrdiff_t Offset = I - begin();
336
883k
    if (Val.isNull()) {
337
854k
      if (std::next(From) == To) {
338
712k
        Val = *From;
339
712k
        return begin();
340
712k
      }
341
141k
342
141k
      Val = new VecTy();
343
141k
    } else 
if (EltTy 28.7k
V28.7k
= Val.template dyn_cast<EltTy>()) {
344
17.7k
      Val = new VecTy();
345
17.7k
      Val.template get<VecTy*>()->push_back(V);
346
17.7k
    }
347
883k
    
return Val.template get<VecTy*>()->insert(begin() + Offset, From, To)170k
;
348
883k
  }
Unexecuted instantiation: clang::ParsedAttr** llvm::TinyPtrVector<clang::ParsedAttr*>::insert<clang::ParsedAttr* const*>(clang::ParsedAttr**, clang::ParsedAttr* const*, clang::ParsedAttr* const*)
clang::serialization::ModuleFile** llvm::TinyPtrVector<clang::serialization::ModuleFile*>::insert<clang::serialization::ModuleFile**>(clang::serialization::ModuleFile**, clang::serialization::ModuleFile**, clang::serialization::ModuleFile**)
Line
Count
Source
328
12.2k
  iterator insert(iterator I, ItTy From, ItTy To) {
329
12.2k
    assert(I >= this->begin() && "Insertion iterator is out of bounds.");
330
12.2k
    assert(I <= this->end() && "Inserting past the end of the vector.");
331
12.2k
    if (From == To)
332
11.9k
      return I;
333
245
334
245
    // If we have a single value, convert to a vector.
335
245
    ptrdiff_t Offset = I - begin();
336
245
    if (Val.isNull()) {
337
40
      if (std::next(From) == To) {
338
0
        Val = *From;
339
0
        return begin();
340
0
      }
341
40
342
40
      Val = new VecTy();
343
205
    } else if (EltTy V = Val.template dyn_cast<EltTy>()) {
344
0
      Val = new VecTy();
345
0
      Val.template get<VecTy*>()->push_back(V);
346
0
    }
347
245
    return Val.template get<VecTy*>()->insert(begin() + Offset, From, To);
348
245
  }
clang::ModuleMacro** llvm::TinyPtrVector<clang::ModuleMacro*>::insert<clang::ModuleMacro* const*>(clang::ModuleMacro**, clang::ModuleMacro* const*, clang::ModuleMacro* const*)
Line
Count
Source
328
2.23k
  iterator insert(iterator I, ItTy From, ItTy To) {
329
2.23k
    assert(I >= this->begin() && "Insertion iterator is out of bounds.");
330
2.23k
    assert(I <= this->end() && "Inserting past the end of the vector.");
331
2.23k
    if (From == To)
332
2.23k
      return I;
333
0
334
0
    // If we have a single value, convert to a vector.
335
0
    ptrdiff_t Offset = I - begin();
336
0
    if (Val.isNull()) {
337
0
      if (std::next(From) == To) {
338
0
        Val = *From;
339
0
        return begin();
340
0
      }
341
0
342
0
      Val = new VecTy();
343
0
    } else if (EltTy V = Val.template dyn_cast<EltTy>()) {
344
0
      Val = new VecTy();
345
0
      Val.template get<VecTy*>()->push_back(V);
346
0
    }
347
0
    return Val.template get<VecTy*>()->insert(begin() + Offset, From, To);
348
0
  }
clang::ModuleMacro** llvm::TinyPtrVector<clang::ModuleMacro*>::insert<clang::ModuleMacro**>(clang::ModuleMacro**, clang::ModuleMacro**, clang::ModuleMacro**)
Line
Count
Source
328
1.25k
  iterator insert(iterator I, ItTy From, ItTy To) {
329
1.25k
    assert(I >= this->begin() && "Insertion iterator is out of bounds.");
330
1.25k
    assert(I <= this->end() && "Inserting past the end of the vector.");
331
1.25k
    if (From == To)
332
1.08k
      return I;
333
168
334
168
    // If we have a single value, convert to a vector.
335
168
    ptrdiff_t Offset = I - begin();
336
168
    if (Val.isNull()) {
337
168
      if (std::next(From) == To) {
338
147
        Val = *From;
339
147
        return begin();
340
147
      }
341
21
342
21
      Val = new VecTy();
343
21
    } else 
if (EltTy 0
V0
= Val.template dyn_cast<EltTy>()) {
344
0
      Val = new VecTy();
345
0
      Val.template get<VecTy*>()->push_back(V);
346
0
    }
347
168
    
return Val.template get<VecTy*>()->insert(begin() + Offset, From, To)21
;
348
168
  }
349
};
350
351
} // end namespace llvm
352
353
#endif // LLVM_ADT_TINYPTRVECTOR_H