Coverage Report

Created: 2018-11-16 02:38

/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
311M
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::BasicBlock*>::TinyPtrVector()
Line
Count
Source
41
2.05k
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::MCSymbol*>::TinyPtrVector()
Line
Count
Source
41
565
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::MachineInstr*>::TinyPtrVector()
Line
Count
Source
41
102k
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::Metadata*>::TinyPtrVector()
Line
Count
Source
41
133
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::TinyPtrVector()
Line
Count
Source
41
5.43M
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::Value*>::TinyPtrVector()
Line
Count
Source
41
357
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::PHINode*>::TinyPtrVector()
Line
Count
Source
41
59
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::Instruction*>::TinyPtrVector()
Line
Count
Source
41
2.77k
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::Function*>::TinyPtrVector()
Line
Count
Source
41
7
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::ModuleMacro*>::TinyPtrVector()
Line
Count
Source
41
27.8k
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::DISubprogram const*>::TinyPtrVector()
Line
Count
Source
41
67
  TinyPtrVector() = default;
llvm::TinyPtrVector<int*>::TinyPtrVector()
Line
Count
Source
41
28
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::ObjCPropertyDecl*>::TinyPtrVector()
Line
Count
Source
41
112
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::ParsedAttr*>::TinyPtrVector()
Line
Count
Source
41
304M
  TinyPtrVector() = default;
llvm::TinyPtrVector<void*>::TinyPtrVector()
Line
Count
Source
41
10.0k
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::serialization::ModuleFile*>::TinyPtrVector()
Line
Count
Source
41
10.0k
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::VarDecl*>::TinyPtrVector()
Line
Count
Source
41
456k
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::NamedDecl*>::TinyPtrVector()
Line
Count
Source
41
9.02k
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::ParmVarDecl*>::TinyPtrVector()
Line
Count
Source
41
3
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::Module*>::TinyPtrVector()
Line
Count
Source
41
957
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::TinyPtrVector()
Line
Count
Source
41
91.7k
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::TinyPtrVector()
Line
Count
Source
41
13.5k
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::AnalysisKey*>::TinyPtrVector()
Line
Count
Source
41
349
  TinyPtrVector() = default;
llvm::TinyPtrVector<lld::elf::InputSection*>::TinyPtrVector()
Line
Count
Source
41
391k
  TinyPtrVector() = default;
42
43
393M
  ~TinyPtrVector() {
44
393M
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
6.84M
      delete V;
46
393M
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::~TinyPtrVector()
Line
Count
Source
43
2.05k
  ~TinyPtrVector() {
44
2.05k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
22
      delete V;
46
2.05k
  }
llvm::TinyPtrVector<llvm::AnalysisKey*>::~TinyPtrVector()
Line
Count
Source
43
349
  ~TinyPtrVector() {
44
349
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
0
      delete V;
46
349
  }
llvm::TinyPtrVector<llvm::MCSymbol*>::~TinyPtrVector()
Line
Count
Source
43
564
  ~TinyPtrVector() {
44
564
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
0
      delete V;
46
564
  }
llvm::TinyPtrVector<llvm::MachineInstr*>::~TinyPtrVector()
Line
Count
Source
43
102k
  ~TinyPtrVector() {
44
102k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
15
      delete V;
46
102k
  }
llvm::TinyPtrVector<llvm::Metadata*>::~TinyPtrVector()
Line
Count
Source
43
133
  ~TinyPtrVector() {
44
133
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
0
      delete V;
46
133
  }
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::~TinyPtrVector()
Line
Count
Source
43
5.43M
  ~TinyPtrVector() {
44
5.43M
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
2
      delete V;
46
5.43M
  }
llvm::TinyPtrVector<llvm::Value*>::~TinyPtrVector()
Line
Count
Source
43
855
  ~TinyPtrVector() {
44
855
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
9
      delete V;
46
855
  }
llvm::TinyPtrVector<llvm::PHINode*>::~TinyPtrVector()
Line
Count
Source
43
177
  ~TinyPtrVector() {
44
177
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
0
      delete V;
46
177
  }
llvm::TinyPtrVector<llvm::Instruction*>::~TinyPtrVector()
Line
Count
Source
43
2.77k
  ~TinyPtrVector() {
44
2.77k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
1.48k
      delete V;
46
2.77k
  }
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.7k
  ~TinyPtrVector() {
44
46.7k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
487
      delete V;
46
46.7k
  }
llvm::TinyPtrVector<llvm::DISubprogram const*>::~TinyPtrVector()
Line
Count
Source
43
221
  ~TinyPtrVector() {
44
221
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
1
      delete V;
46
221
  }
llvm::TinyPtrVector<int*>::~TinyPtrVector()
Line
Count
Source
43
55
  ~TinyPtrVector() {
44
55
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
14
      delete V;
46
55
  }
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
387M
  ~TinyPtrVector() {
44
387M
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
6.82M
      delete V;
46
387M
  }
llvm::TinyPtrVector<clang::serialization::ModuleFile*>::~TinyPtrVector()
Line
Count
Source
43
11.4k
  ~TinyPtrVector() {
44
11.4k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
40
      delete V;
46
11.4k
  }
llvm::TinyPtrVector<void*>::~TinyPtrVector()
Line
Count
Source
43
11.4k
  ~TinyPtrVector() {
44
11.4k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
1.34k
      delete V;
46
11.4k
  }
llvm::TinyPtrVector<clang::VarDecl*>::~TinyPtrVector()
Line
Count
Source
43
453k
  ~TinyPtrVector() {
44
453k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
18
      delete V;
46
453k
  }
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
9.02k
  ~TinyPtrVector() {
44
9.02k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
4.41k
      delete V;
46
9.02k
  }
llvm::TinyPtrVector<clang::Module*>::~TinyPtrVector()
Line
Count
Source
43
1.28k
  ~TinyPtrVector() {
44
1.28k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
309
      delete V;
46
1.28k
  }
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::~TinyPtrVector()
Line
Count
Source
43
103k
  ~TinyPtrVector() {
44
103k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
189
      delete V;
46
103k
  }
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::~TinyPtrVector()
Line
Count
Source
43
13.5k
  ~TinyPtrVector() {
44
13.5k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
5.18k
      delete V;
46
13.5k
  }
llvm::TinyPtrVector<lld::elf::InputSection*>::~TinyPtrVector()
Line
Count
Source
43
391k
  ~TinyPtrVector() {
44
391k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
45
3
      delete V;
46
391k
  }
47
48
82.5M
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
49
82.5M
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
50
2.23M
      Val = new VecTy(*V);
51
82.5M
  }
llvm::TinyPtrVector<llvm::MachineInstr*>::TinyPtrVector(llvm::TinyPtrVector<llvm::MachineInstr*> const&)
Line
Count
Source
48
2
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
49
2
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
50
0
      Val = new VecTy(*V);
51
2
  }
llvm::TinyPtrVector<llvm::Value*>::TinyPtrVector(llvm::TinyPtrVector<llvm::Value*> const&)
Line
Count
Source
48
162
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
49
162
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
50
0
      Val = new VecTy(*V);
51
162
  }
llvm::TinyPtrVector<llvm::PHINode*>::TinyPtrVector(llvm::TinyPtrVector<llvm::PHINode*> const&)
Line
Count
Source
48
59
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
49
59
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
50
0
      Val = new VecTy(*V);
51
59
  }
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
12
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
49
12
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
50
1
      Val = new VecTy(*V);
51
12
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::TinyPtrVector(llvm::TinyPtrVector<clang::ParsedAttr*> const&)
Line
Count
Source
48
82.4M
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
49
82.4M
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
50
2.23M
      Val = new VecTy(*V);
51
82.4M
  }
llvm::TinyPtrVector<clang::VarDecl*>::TinyPtrVector(llvm::TinyPtrVector<clang::VarDecl*> const&)
Line
Count
Source
48
5.77k
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
49
5.77k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
50
0
      Val = new VecTy(*V);
51
5.77k
  }
52
53
65.2k
  TinyPtrVector &operator=(const TinyPtrVector &RHS) {
54
65.2k
    if (this == &RHS)
55
0
      return *this;
56
65.2k
    if (RHS.empty()) {
57
64.0k
      this->clear();
58
64.0k
      return *this;
59
64.0k
    }
60
1.19k
61
1.19k
    // Try to squeeze into the single slot. If it won't fit, allocate a copied
62
1.19k
    // vector.
63
1.19k
    if (Val.template is<EltTy>()) {
64
1.19k
      if (RHS.size() == 1)
65
1.19k
        Val = RHS.front();
66
0
      else
67
0
        Val = new VecTy(*RHS.Val.template get<VecTy*>());
68
1.19k
      return *this;
69
1.19k
    }
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::DbgVariableIntrinsic*>::operator=(llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*> 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.2k
  TinyPtrVector &operator=(const TinyPtrVector &RHS) {
54
65.2k
    if (this == &RHS)
55
0
      return *this;
56
65.2k
    if (RHS.empty()) {
57
64.0k
      this->clear();
58
64.0k
      return *this;
59
64.0k
    }
60
1.17k
61
1.17k
    // Try to squeeze into the single slot. If it won't fit, allocate a copied
62
1.17k
    // vector.
63
1.17k
    if (Val.template is<EltTy>()) {
64
1.17k
      if (RHS.size() == 1)
65
1.17k
        Val = RHS.front();
66
0
      else
67
0
        Val = new VecTy(*RHS.Val.template get<VecTy*>());
68
1.17k
      return *this;
69
1.17k
    }
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
124k
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
82
124k
    RHS.Val = (EltTy)nullptr;
83
124k
  }
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::MachineInstr*>::TinyPtrVector(llvm::TinyPtrVector<llvm::MachineInstr*>&&)
Unexecuted instantiation: llvm::TinyPtrVector<llvm::Metadata*>::TinyPtrVector(llvm::TinyPtrVector<llvm::Metadata*>&&)
llvm::TinyPtrVector<llvm::Value*>::TinyPtrVector(llvm::TinyPtrVector<llvm::Value*>&&)
Line
Count
Source
81
174
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
82
174
    RHS.Val = (EltTy)nullptr;
83
174
  }
llvm::TinyPtrVector<llvm::PHINode*>::TinyPtrVector(llvm::TinyPtrVector<llvm::PHINode*>&&)
Line
Count
Source
81
59
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
82
59
    RHS.Val = (EltTy)nullptr;
83
59
  }
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::TinyPtrVector(llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>&&)
Line
Count
Source
81
358
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
82
358
    RHS.Val = (EltTy)nullptr;
83
358
  }
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
134
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
82
134
    RHS.Val = (EltTy)nullptr;
83
134
  }
llvm::TinyPtrVector<int*>::TinyPtrVector(llvm::TinyPtrVector<int*>&&)
Line
Count
Source
81
10
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
82
10
    RHS.Val = (EltTy)nullptr;
83
10
  }
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
329
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
82
329
    RHS.Val = (EltTy)nullptr;
83
329
  }
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::TinyPtrVector(llvm::TinyPtrVector<clang::CXXMethodDecl const*>&&)
Line
Count
Source
81
100k
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
82
100k
    RHS.Val = (EltTy)nullptr;
83
100k
  }
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.98M
  TinyPtrVector &operator=(TinyPtrVector &&RHS) {
86
1.98M
    if (this == &RHS)
87
0
      return *this;
88
1.98M
    if (RHS.empty()) {
89
1.98M
      this->clear();
90
1.98M
      return *this;
91
1.98M
    }
92
210
93
210
    // If this vector has been allocated on the heap, re-use it if cheap. If it
94
210
    // would require more copying, just delete it and we'll steal the other
95
210
    // side.
96
210
    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
210
106
210
    Val = RHS.Val;
107
210
    RHS.Val = (EltTy)nullptr;
108
210
    return *this;
109
210
  }
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::DbgVariableIntrinsic*>::operator=(llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>&&)
Line
Count
Source
85
1.98M
  TinyPtrVector &operator=(TinyPtrVector &&RHS) {
86
1.98M
    if (this == &RHS)
87
0
      return *this;
88
1.98M
    if (RHS.empty()) {
89
1.98M
      this->clear();
90
1.98M
      return *this;
91
1.98M
    }
92
113
93
113
    // If this vector has been allocated on the heap, re-use it if cheap. If it
94
113
    // would require more copying, just delete it and we'll steal the other
95
113
    // side.
96
113
    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
113
106
113
    Val = RHS.Val;
107
113
    RHS.Val = (EltTy)nullptr;
108
113
    return *this;
109
113
  }
llvm::TinyPtrVector<llvm::Value*>::operator=(llvm::TinyPtrVector<llvm::Value*>&&)
Line
Count
Source
85
135
  TinyPtrVector &operator=(TinyPtrVector &&RHS) {
86
135
    if (this == &RHS)
87
0
      return *this;
88
135
    if (RHS.empty()) {
89
38
      this->clear();
90
38
      return *this;
91
38
    }
92
97
93
97
    // If this vector has been allocated on the heap, re-use it if cheap. If it
94
97
    // would require more copying, just delete it and we'll steal the other
95
97
    // side.
96
97
    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
97
106
97
    Val = RHS.Val;
107
97
    RHS.Val = (EltTy)nullptr;
108
97
    return *this;
109
97
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::operator=(llvm::TinyPtrVector<clang::ParsedAttr*>&&)
Line
Count
Source
85
146
  TinyPtrVector &operator=(TinyPtrVector &&RHS) {
86
146
    if (this == &RHS)
87
0
      return *this;
88
146
    if (RHS.empty()) {
89
146
      this->clear();
90
146
      return *this;
91
146
    }
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
162
                                 : 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.8k
  operator ArrayRef<EltTy>() const {
135
13.8k
    if (Val.isNull())
136
0
      return None;
137
13.8k
    if (Val.template is<EltTy>())
138
13.6k
      return *Val.getAddrOfPtr1();
139
178
    return *Val.template get<VecTy*>();
140
178
  }
141
142
  // implicit conversion operator to MutableArrayRef.
143
57.7k
  operator MutableArrayRef<EltTy>() {
144
57.7k
    if (Val.isNull())
145
53.3k
      return None;
146
4.45k
    if (Val.template is<EltTy>())
147
3.96k
      return *Val.getAddrOfPtr1();
148
493
    return *Val.template get<VecTy*>();
149
493
  }
llvm::TinyPtrVector<llvm::MCSymbol*>::operator llvm::MutableArrayRef<llvm::MCSymbol*>()
Line
Count
Source
143
1.39k
  operator MutableArrayRef<EltTy>() {
144
1.39k
    if (Val.isNull())
145
0
      return None;
146
1.39k
    if (Val.template is<EltTy>())
147
1.39k
      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
160
  operator MutableArrayRef<EltTy>() {
144
160
    if (Val.isNull())
145
0
      return None;
146
160
    if (Val.template is<EltTy>())
147
155
      return *Val.getAddrOfPtr1();
148
5
    return *Val.template get<VecTy*>();
149
5
  }
llvm::TinyPtrVector<clang::ModuleMacro*>::operator llvm::MutableArrayRef<clang::ModuleMacro*>()
Line
Count
Source
143
55.1k
  operator MutableArrayRef<EltTy>() {
144
55.1k
    if (Val.isNull())
145
53.2k
      return None;
146
1.81k
    if (Val.template is<EltTy>())
147
1.58k
      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.08k
  operator MutableArrayRef<EltTy>() {
144
1.08k
    if (Val.isNull())
145
0
      return None;
146
1.08k
    if (Val.template is<EltTy>())
147
829
      return *Val.getAddrOfPtr1();
148
256
    return *Val.template get<VecTy*>();
149
256
  }
llvm::TinyPtrVector<lld::elf::InputSection*>::operator llvm::MutableArrayRef<lld::elf::InputSection*>()
Line
Count
Source
143
27
  operator MutableArrayRef<EltTy>() {
144
27
    if (Val.isNull())
145
22
      return None;
146
5
    if (Val.template is<EltTy>())
147
4
      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
108M
  bool empty() const {
161
108M
    // This vector can be empty if it contains no element, or if it
162
108M
    // contains a pointer to an empty vector.
163
108M
    if (Val.isNull()) 
return true102M
;
164
6.15M
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
165
4.40M
      return Vec->empty();
166
1.75M
    return false;
167
1.75M
  }
llvm::TinyPtrVector<llvm::AnalysisKey*>::empty() const
Line
Count
Source
160
270
  bool empty() const {
161
270
    // This vector can be empty if it contains no element, or if it
162
270
    // contains a pointer to an empty vector.
163
270
    if (Val.isNull()) 
return true232
;
164
38
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
165
0
      return Vec->empty();
166
38
    return false;
167
38
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::empty() const
Line
Count
Source
160
919
  bool empty() const {
161
919
    // This vector can be empty if it contains no element, or if it
162
919
    // contains a pointer to an empty vector.
163
919
    if (Val.isNull()) 
return true0
;
164
919
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
165
58
      return Vec->empty();
166
861
    return false;
167
861
  }
llvm::TinyPtrVector<llvm::MCSymbol*>::empty() const
Line
Count
Source
160
1.39k
  bool empty() const {
161
1.39k
    // This vector can be empty if it contains no element, or if it
162
1.39k
    // contains a pointer to an empty vector.
163
1.39k
    if (Val.isNull()) 
return true565
;
164
826
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
165
0
      return Vec->empty();
166
826
    return false;
167
826
  }
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::empty() const
Line
Count
Source
160
3.08M
  bool empty() const {
161
3.08M
    // This vector can be empty if it contains no element, or if it
162
3.08M
    // contains a pointer to an empty vector.
163
3.08M
    if (Val.isNull()) 
return true3.08M
;
164
286
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
165
2
      return Vec->empty();
166
284
    return false;
167
284
  }
llvm::TinyPtrVector<llvm::Value*>::empty() const
Line
Count
Source
160
282
  bool empty() const {
161
282
    // This vector can be empty if it contains no element, or if it
162
282
    // contains a pointer to an empty vector.
163
282
    if (Val.isNull()) 
return true82
;
164
200
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
165
14
      return Vec->empty();
166
186
    return false;
167
186
  }
llvm::TinyPtrVector<llvm::Instruction*>::empty() const
Line
Count
Source
160
7.27k
  bool empty() const {
161
7.27k
    // This vector can be empty if it contains no element, or if it
162
7.27k
    // contains a pointer to an empty vector.
163
7.27k
    if (Val.isNull()) 
return true0
;
164
7.27k
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
165
4.70k
      return Vec->empty();
166
2.56k
    return false;
167
2.56k
  }
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
105M
  bool empty() const {
161
105M
    // This vector can be empty if it contains no element, or if it
162
105M
    // contains a pointer to an empty vector.
163
105M
    if (Val.isNull()) 
return true99.1M
;
164
6.03M
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
165
4.38M
      return Vec->empty();
166
1.65M
    return false;
167
1.65M
  }
llvm::TinyPtrVector<clang::serialization::ModuleFile*>::empty() const
Line
Count
Source
160
30.6k
  bool empty() const {
161
30.6k
    // This vector can be empty if it contains no element, or if it
162
30.6k
    // contains a pointer to an empty vector.
163
30.6k
    if (Val.isNull()) 
return true30.3k
;
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
115k
  bool empty() const {
161
115k
    // This vector can be empty if it contains no element, or if it
162
115k
    // contains a pointer to an empty vector.
163
115k
    if (Val.isNull()) 
return true2.93k
;
164
112k
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
165
20.3k
      return Vec->empty();
166
92.0k
    return false;
167
92.0k
  }
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
35.6k
  unsigned size() const {
170
35.6k
    if (empty())
171
0
      return 0;
172
35.6k
    if (Val.template is<EltTy>())
173
28.2k
      return 1;
174
7.37k
    return Val.template get<VecTy*>()->size();
175
7.37k
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::size() const
Line
Count
Source
169
914
  unsigned size() const {
170
914
    if (empty())
171
0
      return 0;
172
914
    if (Val.template is<EltTy>())
173
856
      return 1;
174
58
    return Val.template get<VecTy*>()->size();
175
58
  }
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::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.77k
  unsigned size() const {
170
2.77k
    if (empty())
171
0
      return 0;
172
2.77k
    if (Val.template is<EltTy>())
173
1.28k
      return 1;
174
1.48k
    return Val.template get<VecTy*>()->size();
175
1.48k
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::size() const
Line
Count
Source
169
1.39k
  unsigned size() const {
170
1.39k
    if (empty())
171
0
      return 0;
172
1.39k
    if (Val.template is<EltTy>())
173
1.38k
      return 1;
174
9
    return Val.template get<VecTy*>()->size();
175
9
  }
llvm::TinyPtrVector<void*>::size() const
Line
Count
Source
169
30.5k
  unsigned size() const {
170
30.5k
    if (empty())
171
0
      return 0;
172
30.5k
    if (Val.template is<EltTy>())
173
24.7k
      return 1;
174
5.81k
    return Val.template get<VecTy*>()->size();
175
5.81k
  }
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
874M
  iterator begin() {
183
874M
    if (Val.template is<EltTy>())
184
862M
      return Val.getAddrOfPtr1();
185
11.6M
186
11.6M
    return Val.template get<VecTy *>()->begin();
187
11.6M
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::begin()
Line
Count
Source
182
860M
  iterator begin() {
183
860M
    if (Val.template is<EltTy>())
184
849M
      return Val.getAddrOfPtr1();
185
11.5M
186
11.5M
    return Val.template get<VecTy *>()->begin();
187
11.5M
  }
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
9.41k
  iterator begin() {
183
9.41k
    if (Val.template is<EltTy>())
184
9.35k
      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::MachineInstr*>::begin()
Line
Count
Source
182
204k
  iterator begin() {
183
204k
    if (Val.template is<EltTy>())
184
204k
      return Val.getAddrOfPtr1();
185
0
186
0
    return Val.template get<VecTy *>()->begin();
187
0
  }
llvm::TinyPtrVector<llvm::Metadata*>::begin()
Line
Count
Source
182
218
  iterator begin() {
183
218
    if (Val.template is<EltTy>())
184
218
      return Val.getAddrOfPtr1();
185
0
186
0
    return Val.template get<VecTy *>()->begin();
187
0
  }
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::begin()
Line
Count
Source
182
4.68M
  iterator begin() {
183
4.68M
    if (Val.template is<EltTy>())
184
4.68M
      return Val.getAddrOfPtr1();
185
3
186
3
    return Val.template get<VecTy *>()->begin();
187
3
  }
llvm::TinyPtrVector<llvm::Value*>::begin()
Line
Count
Source
182
69
  iterator begin() {
183
69
    if (Val.template is<EltTy>())
184
68
      return Val.getAddrOfPtr1();
185
1
186
1
    return Val.template get<VecTy *>()->begin();
187
1
  }
llvm::TinyPtrVector<llvm::PHINode*>::begin()
Line
Count
Source
182
177
  iterator begin() {
183
177
    if (Val.template is<EltTy>())
184
177
      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.50k
  iterator begin() {
183
1.50k
    if (Val.template is<EltTy>())
184
0
      return Val.getAddrOfPtr1();
185
1.50k
186
1.50k
    return Val.template get<VecTy *>()->begin();
187
1.50k
  }
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
131
  iterator begin() {
183
131
    if (Val.template is<EltTy>())
184
130
      return Val.getAddrOfPtr1();
185
1
186
1
    return Val.template get<VecTy *>()->begin();
187
1
  }
llvm::TinyPtrVector<int*>::begin()
Line
Count
Source
182
1.60k
  iterator begin() {
183
1.60k
    if (Val.template is<EltTy>())
184
118
      return Val.getAddrOfPtr1();
185
1.48k
186
1.48k
    return Val.template get<VecTy *>()->begin();
187
1.48k
  }
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.4k
  iterator begin() {
183
12.4k
    if (Val.template is<EltTy>())
184
11.9k
      return Val.getAddrOfPtr1();
185
489
186
489
    return Val.template get<VecTy *>()->begin();
187
489
  }
llvm::TinyPtrVector<void*>::begin()
Line
Count
Source
182
159k
  iterator begin() {
183
159k
    if (Val.template is<EltTy>())
184
137k
      return Val.getAddrOfPtr1();
185
21.7k
186
21.7k
    return Val.template get<VecTy *>()->begin();
187
21.7k
  }
llvm::TinyPtrVector<clang::VarDecl*>::begin()
Line
Count
Source
182
7.02M
  iterator begin() {
183
7.02M
    if (Val.template is<EltTy>())
184
7.02M
      return Val.getAddrOfPtr1();
185
768
186
768
    return Val.template get<VecTy *>()->begin();
187
768
  }
llvm::TinyPtrVector<clang::NamedDecl*>::begin()
Line
Count
Source
182
10.4k
  iterator begin() {
183
10.4k
    if (Val.template is<EltTy>())
184
9.10k
      return Val.getAddrOfPtr1();
185
1.35k
186
1.35k
    return Val.template get<VecTy *>()->begin();
187
1.35k
  }
llvm::TinyPtrVector<clang::Module*>::begin()
Line
Count
Source
182
2.55k
  iterator begin() {
183
2.55k
    if (Val.template is<EltTy>())
184
1.97k
      return Val.getAddrOfPtr1();
185
580
186
580
    return Val.template get<VecTy *>()->begin();
187
580
  }
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::begin()
Line
Count
Source
182
1.09M
  iterator begin() {
183
1.09M
    if (Val.template is<EltTy>())
184
1.08M
      return Val.getAddrOfPtr1();
185
6.31k
186
6.31k
    return Val.template get<VecTy *>()->begin();
187
6.31k
  }
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::begin()
Line
Count
Source
182
66.9k
  iterator begin() {
183
66.9k
    if (Val.template is<EltTy>())
184
62.0k
      return Val.getAddrOfPtr1();
185
4.85k
186
4.85k
    return Val.template get<VecTy *>()->begin();
187
4.85k
  }
llvm::TinyPtrVector<clang::ModuleMacro*>::begin()
Line
Count
Source
182
14.3k
  iterator begin() {
183
14.3k
    if (Val.template is<EltTy>())
184
13.7k
      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
689
  iterator begin() {
183
689
    if (Val.template is<EltTy>())
184
688
      return Val.getAddrOfPtr1();
185
1
186
1
    return Val.template get<VecTy *>()->begin();
187
1
  }
188
189
442M
  iterator end() {
190
442M
    if (Val.template is<EltTy>())
191
430M
      return begin() + (Val.isNull() ? 
0424M
:
15.93M
);
192
11.9M
193
11.9M
    return Val.template get<VecTy *>()->end();
194
11.9M
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::end()
Line
Count
Source
189
435M
  iterator end() {
190
435M
    if (Val.template is<EltTy>())
191
423M
      return begin() + (Val.isNull() ? 
0418M
:
15.32M
);
192
11.9M
193
11.9M
    return Val.template get<VecTy *>()->end();
194
11.9M
  }
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() ? 
0930
:
1688
);
192
0
193
0
    return Val.template get<VecTy *>()->end();
194
0
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::end()
Line
Count
Source
189
6.03k
  iterator end() {
190
6.03k
    if (Val.template is<EltTy>())
191
5.95k
      return begin() + (Val.isNull() ? 
04.05k
:
11.89k
);
192
87
193
87
    return Val.template get<VecTy *>()->end();
194
87
  }
Unexecuted instantiation: llvm::TinyPtrVector<llvm::MCSymbol*>::end()
llvm::TinyPtrVector<llvm::MachineInstr*>::end()
Line
Count
Source
189
102k
  iterator end() {
190
102k
    if (Val.template is<EltTy>())
191
102k
      return begin() + (Val.isNull() ? 
0102k
:
12
);
192
0
193
0
    return Val.template get<VecTy *>()->end();
194
0
  }
llvm::TinyPtrVector<llvm::Metadata*>::end()
Line
Count
Source
189
109
  iterator end() {
190
109
    if (Val.template is<EltTy>())
191
109
      return begin() + (Val.isNull() ? 
026
:
183
);
192
0
193
0
    return Val.template get<VecTy *>()->end();
194
0
  }
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::end()
Line
Count
Source
189
2.34M
  iterator end() {
190
2.34M
    if (Val.template is<EltTy>())
191
2.34M
      return begin() + (Val.isNull() ? 
02.34M
:
1246
);
192
6
193
6
    return Val.template get<VecTy *>()->end();
194
6
  }
llvm::TinyPtrVector<llvm::Value*>::end()
Line
Count
Source
189
35
  iterator end() {
190
35
    if (Val.template is<EltTy>())
191
34
      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
118
  iterator end() {
190
118
    if (Val.template is<EltTy>())
191
118
      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.50k
  iterator end() {
190
1.50k
    if (Val.template is<EltTy>())
191
0
      return begin() + (Val.isNull() ? 0 : 1);
192
1.50k
193
1.50k
    return Val.template get<VecTy *>()->end();
194
1.50k
  }
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
66
  iterator end() {
190
66
    if (Val.template is<EltTy>())
191
65
      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
181
  iterator end() {
190
181
    if (Val.template is<EltTy>())
191
54
      return begin() + (Val.isNull() ? 
028
:
126
);
192
127
193
127
    return Val.template get<VecTy *>()->end();
194
127
  }
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.5k
  iterator end() {
190
12.5k
    if (Val.template is<EltTy>())
191
11.9k
      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
42.2k
  iterator end() {
190
42.2k
    if (Val.template is<EltTy>())
191
34.9k
      return begin() + (Val.isNull() ? 
01.46k
:
133.5k
);
192
7.31k
193
7.31k
    return Val.template get<VecTy *>()->end();
194
7.31k
  }
llvm::TinyPtrVector<clang::VarDecl*>::end()
Line
Count
Source
189
3.51M
  iterator end() {
190
3.51M
    if (Val.template is<EltTy>())
191
3.51M
      return begin() + (Val.isNull() ? 
03.51M
:
1136
);
192
769
193
769
    return Val.template get<VecTy *>()->end();
194
769
  }
llvm::TinyPtrVector<clang::NamedDecl*>::end()
Line
Count
Source
189
5.90k
  iterator end() {
190
5.90k
    if (Val.template is<EltTy>())
191
4.55k
      return begin() + (Val.isNull() ? 
00
: 1);
192
1.35k
193
1.35k
    return Val.template get<VecTy *>()->end();
194
1.35k
  }
llvm::TinyPtrVector<clang::Module*>::end()
Line
Count
Source
189
1.99k
  iterator end() {
190
1.99k
    if (Val.template is<EltTy>())
191
1.12k
      return begin() + (Val.isNull() ? 
00
: 1);
192
866
193
866
    return Val.template get<VecTy *>()->end();
194
866
  }
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::end()
Line
Count
Source
189
549k
  iterator end() {
190
549k
    if (Val.template is<EltTy>())
191
543k
      return begin() + (Val.isNull() ? 
00
: 1);
192
6.31k
193
6.31k
    return Val.template get<VecTy *>()->end();
194
6.31k
  }
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::end()
Line
Count
Source
189
51.0k
  iterator end() {
190
51.0k
    if (Val.template is<EltTy>())
191
41.3k
      return begin() + (Val.isNull() ? 
027.1k
:
114.2k
);
192
9.70k
193
9.70k
    return Val.template get<VecTy *>()->end();
194
9.70k
  }
llvm::TinyPtrVector<clang::ModuleMacro*>::end()
Line
Count
Source
189
9.12k
  iterator end() {
190
9.12k
    if (Val.template is<EltTy>())
191
8.54k
      return begin() + (Val.isNull() ? 
06.09k
:
12.45k
);
192
573
193
573
    return Val.template get<VecTy *>()->end();
194
573
  }
llvm::TinyPtrVector<lld::elf::InputSection*>::end()
Line
Count
Source
189
345
  iterator end() {
190
345
    if (Val.template is<EltTy>())
191
344
      return begin() + (Val.isNull() ? 
0327
:
117
);
192
1
193
1
    return Val.template get<VecTy *>()->end();
194
1
  }
195
196
83.9M
  const_iterator begin() const {
197
83.9M
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
198
83.9M
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::begin() const
Line
Count
Source
196
79.7M
  const_iterator begin() const {
197
79.7M
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
198
79.7M
  }
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::DbgVariableIntrinsic*>::begin() const
Line
Count
Source
196
22.7k
  const_iterator begin() const {
197
22.7k
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
198
22.7k
  }
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<void*>::begin() const
Line
Count
Source
196
81.8k
  const_iterator begin() const {
197
81.8k
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
198
81.8k
  }
llvm::TinyPtrVector<clang::VarDecl*>::begin() const
Line
Count
Source
196
3.51M
  const_iterator begin() const {
197
3.51M
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
198
3.51M
  }
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::begin() const
Line
Count
Source
196
549k
  const_iterator begin() const {
197
549k
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
198
549k
  }
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::begin() const
Line
Count
Source
196
2.26k
  const_iterator begin() const {
197
2.26k
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
198
2.26k
  }
199
200
87.5M
  const_iterator end() const {
201
87.5M
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
202
87.5M
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::end() const
Line
Count
Source
200
83.4M
  const_iterator end() const {
201
83.4M
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
202
83.4M
  }
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::DbgVariableIntrinsic*>::end() const
Line
Count
Source
200
22.7k
  const_iterator end() const {
201
22.7k
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
202
22.7k
  }
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<clang::VarDecl*>::end() const
Line
Count
Source
200
3.51M
  const_iterator end() const {
201
3.51M
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
202
3.51M
  }
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::end() const
Line
Count
Source
200
549k
  const_iterator end() const {
201
549k
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
202
549k
  }
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::end() const
Line
Count
Source
200
4.52k
  const_iterator end() const {
201
4.52k
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
202
4.52k
  }
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.09k
  EltTy front() const {
228
2.09k
    assert(!empty() && "vector empty");
229
2.09k
    if (EltTy V = Val.template dyn_cast<EltTy>())
230
2.06k
      return V;
231
29
    return Val.template get<VecTy*>()->front();
232
29
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::front() const
Line
Count
Source
227
677
  EltTy front() const {
228
677
    assert(!empty() && "vector empty");
229
677
    if (EltTy V = Val.template dyn_cast<EltTy>())
230
675
      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::DbgVariableIntrinsic*>::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.17k
  EltTy front() const {
228
1.17k
    assert(!empty() && "vector empty");
229
1.17k
    if (EltTy V = Val.template dyn_cast<EltTy>())
230
1.17k
      return V;
231
0
    return Val.template get<VecTy*>()->front();
232
0
  }
233
234
21
  EltTy back() const {
235
21
    assert(!empty() && "vector empty");
236
21
    if (EltTy V = Val.template dyn_cast<EltTy>())
237
20
      return V;
238
1
    return Val.template get<VecTy*>()->back();
239
1
  }
240
241
13.7M
  void push_back(EltTy NewVal) {
242
13.7M
    assert(NewVal && "Can't add a null value");
243
13.7M
244
13.7M
    // If we have nothing, add something.
245
13.7M
    if (Val.isNull()) {
246
6.75M
      Val = NewVal;
247
6.75M
      return;
248
6.75M
    }
249
7.03M
250
7.03M
    // If we have a single value, convert to a vector.
251
7.03M
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
4.43M
      Val = new VecTy();
253
4.43M
      Val.template get<VecTy*>()->push_back(V);
254
4.43M
    }
255
7.03M
256
7.03M
    // Add the new value, we know we have a vector.
257
7.03M
    Val.template get<VecTy*>()->push_back(NewVal);
258
7.03M
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::push_back(llvm::BasicBlock*)
Line
Count
Source
241
2.08k
  void push_back(EltTy NewVal) {
242
2.08k
    assert(NewVal && "Can't add a null value");
243
2.08k
244
2.08k
    // If we have nothing, add something.
245
2.08k
    if (Val.isNull()) {
246
2.05k
      Val = NewVal;
247
2.05k
      return;
248
2.05k
    }
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
565
  void push_back(EltTy NewVal) {
242
565
    assert(NewVal && "Can't add a null value");
243
565
244
565
    // If we have nothing, add something.
245
565
    if (Val.isNull()) {
246
565
      Val = NewVal;
247
565
      return;
248
565
    }
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::MachineInstr*>::push_back(llvm::MachineInstr*)
Line
Count
Source
241
87
  void push_back(EltTy NewVal) {
242
87
    assert(NewVal && "Can't add a null value");
243
87
244
87
    // If we have nothing, add something.
245
87
    if (Val.isNull()) {
246
65
      Val = NewVal;
247
65
      return;
248
65
    }
249
22
250
22
    // If we have a single value, convert to a vector.
251
22
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
15
      Val = new VecTy();
253
15
      Val.template get<VecTy*>()->push_back(V);
254
15
    }
255
22
256
22
    // Add the new value, we know we have a vector.
257
22
    Val.template get<VecTy*>()->push_back(NewVal);
258
22
  }
llvm::TinyPtrVector<llvm::Metadata*>::push_back(llvm::Metadata*)
Line
Count
Source
241
107
  void push_back(EltTy NewVal) {
242
107
    assert(NewVal && "Can't add a null value");
243
107
244
107
    // If we have nothing, add something.
245
107
    if (Val.isNull()) {
246
107
      Val = NewVal;
247
107
      return;
248
107
    }
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
189
  void push_back(EltTy NewVal) {
242
189
    assert(NewVal && "Can't add a null value");
243
189
244
189
    // If we have nothing, add something.
245
189
    if (Val.isNull()) {
246
178
      Val = NewVal;
247
178
      return;
248
178
    }
249
11
250
11
    // If we have a single value, convert to a vector.
251
11
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
9
      Val = new VecTy();
253
9
      Val.template get<VecTy*>()->push_back(V);
254
9
    }
255
11
256
11
    // Add the new value, we know we have a vector.
257
11
    Val.template get<VecTy*>()->push_back(NewVal);
258
11
  }
llvm::TinyPtrVector<llvm::PHINode*>::push_back(llvm::PHINode*)
Line
Count
Source
241
59
  void push_back(EltTy NewVal) {
242
59
    assert(NewVal && "Can't add a null value");
243
59
244
59
    // If we have nothing, add something.
245
59
    if (Val.isNull()) {
246
59
      Val = NewVal;
247
59
      return;
248
59
    }
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::DbgVariableIntrinsic*>::push_back(llvm::DbgVariableIntrinsic*)
Line
Count
Source
241
267
  void push_back(EltTy NewVal) {
242
267
    assert(NewVal && "Can't add a null value");
243
267
244
267
    // If we have nothing, add something.
245
267
    if (Val.isNull()) {
246
266
      Val = NewVal;
247
266
      return;
248
266
    }
249
1
250
1
    // If we have a single value, convert to a vector.
251
2
    
if (EltTy 1
V1
= Val.template dyn_cast<EltTy>()) {
252
2
      Val = new VecTy();
253
2
      Val.template get<VecTy*>()->push_back(V);
254
2
    }
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<llvm::Instruction*>::push_back(llvm::Instruction*)
Line
Count
Source
241
4.50k
  void push_back(EltTy NewVal) {
242
4.50k
    assert(NewVal && "Can't add a null value");
243
4.50k
244
4.50k
    // If we have nothing, add something.
245
4.50k
    if (Val.isNull()) {
246
2.77k
      Val = NewVal;
247
2.77k
      return;
248
2.77k
    }
249
1.73k
250
1.73k
    // If we have a single value, convert to a vector.
251
1.73k
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
1.48k
      Val = new VecTy();
253
1.48k
      Val.template get<VecTy*>()->push_back(V);
254
1.48k
    }
255
1.73k
256
1.73k
    // Add the new value, we know we have a vector.
257
1.73k
    Val.template get<VecTy*>()->push_back(NewVal);
258
1.73k
  }
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
68
  void push_back(EltTy NewVal) {
242
68
    assert(NewVal && "Can't add a null value");
243
68
244
68
    // If we have nothing, add something.
245
68
    if (Val.isNull()) {
246
67
      Val = NewVal;
247
67
      return;
248
67
    }
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
996
  void push_back(EltTy NewVal) {
242
996
    assert(NewVal && "Can't add a null value");
243
996
244
996
    // If we have nothing, add something.
245
996
    if (Val.isNull()) {
246
38
      Val = NewVal;
247
38
      return;
248
38
    }
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<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
13.6M
  void push_back(EltTy NewVal) {
242
13.6M
    assert(NewVal && "Can't add a null value");
243
13.6M
244
13.6M
    // If we have nothing, add something.
245
13.6M
    if (Val.isNull()) {
246
6.60M
      Val = NewVal;
247
6.60M
      return;
248
6.60M
    }
249
7.00M
250
7.00M
    // If we have a single value, convert to a vector.
251
7.00M
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
4.41M
      Val = new VecTy();
253
4.41M
      Val.template get<VecTy*>()->push_back(V);
254
4.41M
    }
255
7.00M
256
7.00M
    // Add the new value, we know we have a vector.
257
7.00M
    Val.template get<VecTy*>()->push_back(NewVal);
258
7.00M
  }
llvm::TinyPtrVector<void*>::push_back(void*)
Line
Count
Source
241
12.5k
  void push_back(EltTy NewVal) {
242
12.5k
    assert(NewVal && "Can't add a null value");
243
12.5k
244
12.5k
    // If we have nothing, add something.
245
12.5k
    if (Val.isNull()) {
246
10.0k
      Val = NewVal;
247
10.0k
      return;
248
10.0k
    }
249
2.52k
250
2.52k
    // If we have a single value, convert to a vector.
251
2.52k
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
1.34k
      Val = new VecTy();
253
1.34k
      Val.template get<VecTy*>()->push_back(V);
254
1.34k
    }
255
2.52k
256
2.52k
    // Add the new value, we know we have a vector.
257
2.52k
    Val.template get<VecTy*>()->push_back(NewVal);
258
2.52k
  }
llvm::TinyPtrVector<clang::VarDecl*>::push_back(clang::VarDecl*)
Line
Count
Source
241
246
  void push_back(EltTy NewVal) {
242
246
    assert(NewVal && "Can't add a null value");
243
246
244
246
    // If we have nothing, add something.
245
246
    if (Val.isNull()) {
246
162
      Val = NewVal;
247
162
      return;
248
162
    }
249
84
250
84
    // If we have a single value, convert to a vector.
251
84
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
26
      Val = new VecTy();
253
26
      Val.template get<VecTy*>()->push_back(V);
254
26
    }
255
84
256
84
    // Add the new value, we know we have a vector.
257
84
    Val.template get<VecTy*>()->push_back(NewVal);
258
84
  }
llvm::TinyPtrVector<clang::NamedDecl*>::push_back(clang::NamedDecl*)
Line
Count
Source
241
14.6k
  void push_back(EltTy NewVal) {
242
14.6k
    assert(NewVal && "Can't add a null value");
243
14.6k
244
14.6k
    // If we have nothing, add something.
245
14.6k
    if (Val.isNull()) {
246
9.02k
      Val = NewVal;
247
9.02k
      return;
248
9.02k
    }
249
5.63k
250
5.63k
    // If we have a single value, convert to a vector.
251
5.63k
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
4.41k
      Val = new VecTy();
253
4.41k
      Val.template get<VecTy*>()->push_back(V);
254
4.41k
    }
255
5.63k
256
5.63k
    // Add the new value, we know we have a vector.
257
5.63k
    Val.template get<VecTy*>()->push_back(NewVal);
258
5.63k
  }
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
3.30k
  void push_back(EltTy NewVal) {
242
3.30k
    assert(NewVal && "Can't add a null value");
243
3.30k
244
3.30k
    // If we have nothing, add something.
245
3.30k
    if (Val.isNull()) {
246
957
      Val = NewVal;
247
957
      return;
248
957
    }
249
2.34k
250
2.34k
    // If we have a single value, convert to a vector.
251
2.34k
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
309
      Val = new VecTy();
253
309
      Val.template get<VecTy*>()->push_back(V);
254
309
    }
255
2.34k
256
2.34k
    // Add the new value, we know we have a vector.
257
2.34k
    Val.template get<VecTy*>()->push_back(NewVal);
258
2.34k
  }
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::push_back(clang::CXXMethodDecl const*)
Line
Count
Source
241
92.5k
  void push_back(EltTy NewVal) {
242
92.5k
    assert(NewVal && "Can't add a null value");
243
92.5k
244
92.5k
    // If we have nothing, add something.
245
92.5k
    if (Val.isNull()) {
246
91.7k
      Val = NewVal;
247
91.7k
      return;
248
91.7k
    }
249
745
250
745
    // If we have a single value, convert to a vector.
251
745
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
560
      Val = new VecTy();
253
560
      Val.template get<VecTy*>()->push_back(V);
254
560
    }
255
745
256
745
    // Add the new value, we know we have a vector.
257
745
    Val.template get<VecTy*>()->push_back(NewVal);
258
745
  }
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::push_back(clang::CXXRecordDecl const*)
Line
Count
Source
241
23.2k
  void push_back(EltTy NewVal) {
242
23.2k
    assert(NewVal && "Can't add a null value");
243
23.2k
244
23.2k
    // If we have nothing, add something.
245
23.2k
    if (Val.isNull()) {
246
13.5k
      Val = NewVal;
247
13.5k
      return;
248
13.5k
    }
249
9.70k
250
9.70k
    // If we have a single value, convert to a vector.
251
9.70k
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
252
5.18k
      Val = new VecTy();
253
5.18k
      Val.template get<VecTy*>()->push_back(V);
254
5.18k
    }
255
9.70k
256
9.70k
    // Add the new value, we know we have a vector.
257
9.70k
    Val.template get<VecTy*>()->push_back(NewVal);
258
9.70k
  }
llvm::TinyPtrVector<clang::ModuleMacro*>::push_back(clang::ModuleMacro*)
Line
Count
Source
241
15.8k
  void push_back(EltTy NewVal) {
242
15.8k
    assert(NewVal && "Can't add a null value");
243
15.8k
244
15.8k
    // If we have nothing, add something.
245
15.8k
    if (Val.isNull()) {
246
15.1k
      Val = NewVal;
247
15.1k
      return;
248
15.1k
    }
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
349
  void push_back(EltTy NewVal) {
242
349
    assert(NewVal && "Can't add a null value");
243
349
244
349
    // If we have nothing, add something.
245
349
    if (Val.isNull()) {
246
349
      Val = NewVal;
247
349
      return;
248
349
    }
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
197
  void push_back(EltTy NewVal) {
242
197
    assert(NewVal && "Can't add a null value");
243
197
244
197
    // If we have nothing, add something.
245
197
    if (Val.isNull()) {
246
194
      Val = NewVal;
247
194
      return;
248
194
    }
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
154M
  void clear() {
269
154M
    // If we have a single value, convert to empty.
270
154M
    if (Val.template is<EltTy>()) {
271
153M
      Val = (EltTy)nullptr;
272
153M
    } else 
if (VecTy *396k
Vec396k
= Val.template dyn_cast<VecTy*>()) {
273
396k
      // If we have a vector form, just clear it.
274
396k
      Vec->clear();
275
396k
    }
276
154M
    // Otherwise, we're already empty.
277
154M
  }
Unexecuted instantiation: llvm::TinyPtrVector<llvm::AnalysisKey*>::clear()
Unexecuted instantiation: llvm::TinyPtrVector<llvm::BasicBlock*>::clear()
Unexecuted instantiation: llvm::TinyPtrVector<llvm::MCSymbol*>::clear()
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::clear()
Line
Count
Source
268
2.91M
  void clear() {
269
2.91M
    // If we have a single value, convert to empty.
270
2.91M
    if (Val.template is<EltTy>()) {
271
2.91M
      Val = (EltTy)nullptr;
272
2.91M
    } else 
if (VecTy *1
Vec1
= Val.template dyn_cast<VecTy*>()) {
273
0
      // If we have a vector form, just clear it.
274
0
      Vec->clear();
275
0
    }
276
2.91M
    // Otherwise, we're already empty.
277
2.91M
  }
llvm::TinyPtrVector<llvm::Value*>::clear()
Line
Count
Source
268
38
  void clear() {
269
38
    // If we have a single value, convert to empty.
270
38
    if (Val.template is<EltTy>()) {
271
38
      Val = (EltTy)nullptr;
272
38
    } 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
38
    // Otherwise, we're already empty.
277
38
  }
llvm::TinyPtrVector<llvm::Instruction*>::clear()
Line
Count
Source
268
2.77k
  void clear() {
269
2.77k
    // If we have a single value, convert to empty.
270
2.77k
    if (Val.template is<EltTy>()) {
271
1.28k
      Val = (EltTy)nullptr;
272
1.48k
    } else if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) {
273
1.48k
      // If we have a vector form, just clear it.
274
1.48k
      Vec->clear();
275
1.48k
    }
276
2.77k
    // Otherwise, we're already empty.
277
2.77k
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::clear()
Line
Count
Source
268
148M
  void clear() {
269
148M
    // If we have a single value, convert to empty.
270
148M
    if (Val.template is<EltTy>()) {
271
147M
      Val = (EltTy)nullptr;
272
147M
    } else 
if (VecTy *393k
Vec393k
= Val.template dyn_cast<VecTy*>()) {
273
393k
      // If we have a vector form, just clear it.
274
393k
      Vec->clear();
275
393k
    }
276
148M
    // Otherwise, we're already empty.
277
148M
  }
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
13.0k
  void clear() {
269
13.0k
    // If we have a single value, convert to empty.
270
13.0k
    if (Val.template is<EltTy>()) {
271
11.6k
      Val = (EltTy)nullptr;
272
11.6k
    } else 
if (VecTy *1.38k
Vec1.38k
= Val.template dyn_cast<VecTy*>()) {
273
1.38k
      // If we have a vector form, just clear it.
274
1.38k
      Vec->clear();
275
1.38k
    }
276
13.0k
    // Otherwise, we're already empty.
277
13.0k
  }
llvm::TinyPtrVector<clang::VarDecl*>::clear()
Line
Count
Source
268
3.09M
  void clear() {
269
3.09M
    // If we have a single value, convert to empty.
270
3.09M
    if (Val.template is<EltTy>()) {
271
3.09M
      Val = (EltTy)nullptr;
272
3.09M
    } else 
if (VecTy *743
Vec743
= Val.template dyn_cast<VecTy*>()) {
273
743
      // If we have a vector form, just clear it.
274
743
      Vec->clear();
275
743
    }
276
3.09M
    // Otherwise, we're already empty.
277
3.09M
  }
llvm::TinyPtrVector<clang::ModuleMacro*>::clear()
Line
Count
Source
268
4.44k
  void clear() {
269
4.44k
    // If we have a single value, convert to empty.
270
4.44k
    if (Val.template is<EltTy>()) {
271
4.41k
      Val = (EltTy)nullptr;
272
4.41k
    } 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.44k
    // Otherwise, we're already empty.
277
4.44k
  }
278
279
28.6k
  iterator erase(iterator I) {
280
28.6k
    assert(I >= begin() && "Iterator to erase is out of bounds.");
281
28.6k
    assert(I < end() && "Erasing at past-the-end iterator.");
282
28.6k
283
28.6k
    // If we have a single value, convert to empty.
284
28.6k
    if (Val.template is<EltTy>()) {
285
26.8k
      if (I == begin())
286
26.8k
        Val = (EltTy)nullptr;
287
26.8k
    } else 
if (VecTy *1.78k
Vec1.78k
= Val.template dyn_cast<VecTy*>()) {
288
1.78k
      // multiple items in a vector; just do the erase, there is no
289
1.78k
      // benefit to collapsing back to a pointer
290
1.78k
      return Vec->erase(I);
291
1.78k
    }
292
26.8k
    return end();
293
26.8k
  }
294
295
1.10k
  iterator erase(iterator S, iterator E) {
296
1.10k
    assert(S >= begin() && "Range to erase is out of bounds.");
297
1.10k
    assert(S <= E && "Trying to erase invalid range.");
298
1.10k
    assert(E <= end() && "Trying to erase past the end.");
299
1.10k
300
1.10k
    if (Val.template is<EltTy>()) {
301
719
      if (S == begin() && 
S != E401
)
302
401
        Val = (EltTy)nullptr;
303
719
    } else 
if (VecTy *386
Vec386
= Val.template dyn_cast<VecTy*>()) {
304
386
      return Vec->erase(S, E);
305
386
    }
306
719
    return end();
307
719
  }
llvm::TinyPtrVector<llvm::AnalysisKey*>::erase(llvm::AnalysisKey**, llvm::AnalysisKey**)
Line
Count
Source
295
270
  iterator erase(iterator S, iterator E) {
296
270
    assert(S >= begin() && "Range to erase is out of bounds.");
297
270
    assert(S <= E && "Trying to erase invalid range.");
298
270
    assert(E <= end() && "Trying to erase past the end.");
299
270
300
270
    if (Val.template is<EltTy>()) {
301
270
      if (S == begin() && 
S != E232
)
302
232
        Val = (EltTy)nullptr;
303
270
    } else 
if (VecTy *0
Vec0
= Val.template dyn_cast<VecTy*>()) {
304
0
      return Vec->erase(S, E);
305
0
    }
306
270
    return end();
307
270
  }
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
566
  iterator erase(iterator S, iterator E) {
296
566
    assert(S >= begin() && "Range to erase is out of bounds.");
297
566
    assert(S <= E && "Trying to erase invalid range.");
298
566
    assert(E <= end() && "Trying to erase past the end.");
299
566
300
566
    if (Val.template is<EltTy>()) {
301
280
      if (S == begin() && 
S != E0
)
302
0
        Val = (EltTy)nullptr;
303
286
    } else if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) {
304
286
      return Vec->erase(S, E);
305
286
    }
306
280
    return end();
307
280
  }
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
  iterator insert(iterator I, const EltTy &Elt) {
310
    assert(I >= this->begin() && "Insertion iterator is out of bounds.");
311
    assert(I <= this->end() && "Inserting past the end of the vector.");
312
    if (I == end()) {
313
      push_back(Elt);
314
      return std::prev(end());
315
    }
316
    assert(!Val.isNull() && "Null value with non-end insert iterator.");
317
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
318
      assert(I == begin());
319
      Val = Elt;
320
      push_back(V);
321
      return begin();
322
    }
323
324
    return Val.template get<VecTy*>()->insert(I, Elt);
325
  }
326
327
  template<typename ItTy>
328
71.1M
  iterator insert(iterator I, ItTy From, ItTy To) {
329
71.1M
    assert(I >= this->begin() && "Insertion iterator is out of bounds.");
330
71.1M
    assert(I <= this->end() && "Inserting past the end of the vector.");
331
71.1M
    if (From == To)
332
70.1M
      return I;
333
939k
334
939k
    // If we have a single value, convert to a vector.
335
939k
    ptrdiff_t Offset = I - begin();
336
939k
    if (Val.isNull()) {
337
909k
      if (std::next(From) == To) {
338
757k
        Val = *From;
339
757k
        return begin();
340
757k
      }
341
151k
342
151k
      Val = new VecTy();
343
151k
    } else 
if (EltTy 30.0k
V30.0k
= Val.template dyn_cast<EltTy>()) {
344
18.2k
      Val = new VecTy();
345
18.2k
      Val.template get<VecTy*>()->push_back(V);
346
18.2k
    }
347
939k
    
return Val.template get<VecTy*>()->insert(begin() + Offset, From, To)181k
;
348
939k
  }
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
71.1M
  iterator insert(iterator I, ItTy From, ItTy To) {
329
71.1M
    assert(I >= this->begin() && "Insertion iterator is out of bounds.");
330
71.1M
    assert(I <= this->end() && "Inserting past the end of the vector.");
331
71.1M
    if (From == To)
332
70.1M
      return I;
333
938k
334
938k
    // If we have a single value, convert to a vector.
335
938k
    ptrdiff_t Offset = I - begin();
336
938k
    if (Val.isNull()) {
337
908k
      if (std::next(From) == To) {
338
757k
        Val = *From;
339
757k
        return begin();
340
757k
      }
341
151k
342
151k
      Val = new VecTy();
343
151k
    } else 
if (EltTy 29.7k
V29.7k
= Val.template dyn_cast<EltTy>()) {
344
18.2k
      Val = new VecTy();
345
18.2k
      Val.template get<VecTy*>()->push_back(V);
346
18.2k
    }
347
938k
    
return Val.template get<VecTy*>()->insert(begin() + Offset, From, To)181k
;
348
938k
  }
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.5k
  iterator insert(iterator I, ItTy From, ItTy To) {
329
12.5k
    assert(I >= this->begin() && "Insertion iterator is out of bounds.");
330
12.5k
    assert(I <= this->end() && "Inserting past the end of the vector.");
331
12.5k
    if (From == To)
332
12.2k
      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.26k
  iterator insert(iterator I, ItTy From, ItTy To) {
329
1.26k
    assert(I >= this->begin() && "Insertion iterator is out of bounds.");
330
1.26k
    assert(I <= this->end() && "Inserting past the end of the vector.");
331
1.26k
    if (From == To)
332
1.09k
      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