Coverage Report

Created: 2019-02-15 18: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
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#ifndef LLVM_ADT_TINYPTRVECTOR_H
10
#define LLVM_ADT_TINYPTRVECTOR_H
11
12
#include "llvm/ADT/ArrayRef.h"
13
#include "llvm/ADT/None.h"
14
#include "llvm/ADT/PointerUnion.h"
15
#include "llvm/ADT/SmallVector.h"
16
#include <cassert>
17
#include <cstddef>
18
#include <iterator>
19
#include <type_traits>
20
21
namespace llvm {
22
23
/// TinyPtrVector - This class is specialized for cases where there are
24
/// normally 0 or 1 element in a vector, but is general enough to go beyond that
25
/// when required.
26
///
27
/// NOTE: This container doesn't allow you to store a null pointer into it.
28
///
29
template <typename EltTy>
30
class TinyPtrVector {
31
public:
32
  using VecTy = SmallVector<EltTy, 4>;
33
  using value_type = typename VecTy::value_type;
34
  using PtrUnion = PointerUnion<EltTy, VecTy *>;
35
36
private:
37
  PtrUnion Val;
38
39
public:
40
313M
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::BasicBlock*>::TinyPtrVector()
Line
Count
Source
40
2.15k
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::MCSymbol*>::TinyPtrVector()
Line
Count
Source
40
569
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::MachineInstr*>::TinyPtrVector()
Line
Count
Source
40
106k
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::Metadata*>::TinyPtrVector()
Line
Count
Source
40
133
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::TinyPtrVector()
Line
Count
Source
40
5.43M
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::Value*>::TinyPtrVector()
Line
Count
Source
40
553
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::PHINode*>::TinyPtrVector()
Line
Count
Source
40
59
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::Instruction*>::TinyPtrVector()
Line
Count
Source
40
2.89k
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::Function*>::TinyPtrVector()
Line
Count
Source
40
7
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::ModuleMacro*>::TinyPtrVector()
Line
Count
Source
40
27.8k
  TinyPtrVector() = default;
llvm::TinyPtrVector<void*>::TinyPtrVector()
Line
Count
Source
40
10.1k
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::serialization::ModuleFile*>::TinyPtrVector()
Line
Count
Source
40
10.1k
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::DISubprogram const*>::TinyPtrVector()
Line
Count
Source
40
74
  TinyPtrVector() = default;
llvm::TinyPtrVector<int*>::TinyPtrVector()
Line
Count
Source
40
29
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::ObjCPropertyDecl*>::TinyPtrVector()
Line
Count
Source
40
112
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::ParsedAttr*>::TinyPtrVector()
Line
Count
Source
40
307M
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::VarDecl*>::TinyPtrVector()
Line
Count
Source
40
463k
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::NamedDecl*>::TinyPtrVector()
Line
Count
Source
40
10.2k
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::ParmVarDecl*>::TinyPtrVector()
Line
Count
Source
40
3
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::Module*>::TinyPtrVector()
Line
Count
Source
40
963
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::TinyPtrVector()
Line
Count
Source
40
91.9k
  TinyPtrVector() = default;
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::TinyPtrVector()
Line
Count
Source
40
14.1k
  TinyPtrVector() = default;
llvm::TinyPtrVector<llvm::AnalysisKey*>::TinyPtrVector()
Line
Count
Source
40
359
  TinyPtrVector() = default;
llvm::TinyPtrVector<lld::elf::InputSection*>::TinyPtrVector()
Line
Count
Source
40
394k
  TinyPtrVector() = default;
41
42
396M
  ~TinyPtrVector() {
43
396M
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
7.24M
      delete V;
45
396M
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::~TinyPtrVector()
Line
Count
Source
42
2.15k
  ~TinyPtrVector() {
43
2.15k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
22
      delete V;
45
2.15k
  }
llvm::TinyPtrVector<llvm::AnalysisKey*>::~TinyPtrVector()
Line
Count
Source
42
359
  ~TinyPtrVector() {
43
359
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
0
      delete V;
45
359
  }
llvm::TinyPtrVector<llvm::MCSymbol*>::~TinyPtrVector()
Line
Count
Source
42
568
  ~TinyPtrVector() {
43
568
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
0
      delete V;
45
568
  }
llvm::TinyPtrVector<llvm::MachineInstr*>::~TinyPtrVector()
Line
Count
Source
42
106k
  ~TinyPtrVector() {
43
106k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
15
      delete V;
45
106k
  }
llvm::TinyPtrVector<llvm::Metadata*>::~TinyPtrVector()
Line
Count
Source
42
133
  ~TinyPtrVector() {
43
133
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
0
      delete V;
45
133
  }
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::~TinyPtrVector()
Line
Count
Source
42
5.43M
  ~TinyPtrVector() {
43
5.43M
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
2
      delete V;
45
5.43M
  }
llvm::TinyPtrVector<llvm::Value*>::~TinyPtrVector()
Line
Count
Source
42
14.3k
  ~TinyPtrVector() {
43
14.3k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
20
      delete V;
45
14.3k
  }
llvm::TinyPtrVector<llvm::PHINode*>::~TinyPtrVector()
Line
Count
Source
42
177
  ~TinyPtrVector() {
43
177
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
0
      delete V;
45
177
  }
llvm::TinyPtrVector<llvm::Instruction*>::~TinyPtrVector()
Line
Count
Source
42
2.89k
  ~TinyPtrVector() {
43
2.89k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
1.57k
      delete V;
45
2.89k
  }
llvm::TinyPtrVector<llvm::Function*>::~TinyPtrVector()
Line
Count
Source
42
14
  ~TinyPtrVector() {
43
14
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
8
      delete V;
45
14
  }
llvm::TinyPtrVector<clang::ModuleMacro*>::~TinyPtrVector()
Line
Count
Source
42
46.7k
  ~TinyPtrVector() {
43
46.7k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
487
      delete V;
45
46.7k
  }
llvm::TinyPtrVector<clang::serialization::ModuleFile*>::~TinyPtrVector()
Line
Count
Source
42
11.6k
  ~TinyPtrVector() {
43
11.6k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
40
      delete V;
45
11.6k
  }
llvm::TinyPtrVector<void*>::~TinyPtrVector()
Line
Count
Source
42
11.6k
  ~TinyPtrVector() {
43
11.6k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
1.34k
      delete V;
45
11.6k
  }
llvm::TinyPtrVector<llvm::DISubprogram const*>::~TinyPtrVector()
Line
Count
Source
42
245
  ~TinyPtrVector() {
43
245
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
3
      delete V;
45
245
  }
llvm::TinyPtrVector<int*>::~TinyPtrVector()
Line
Count
Source
42
58
  ~TinyPtrVector() {
43
58
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
14
      delete V;
45
58
  }
llvm::TinyPtrVector<clang::ObjCPropertyDecl*>::~TinyPtrVector()
Line
Count
Source
42
112
  ~TinyPtrVector() {
43
112
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
18
      delete V;
45
112
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::~TinyPtrVector()
Line
Count
Source
42
390M
  ~TinyPtrVector() {
43
390M
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
7.22M
      delete V;
45
390M
  }
llvm::TinyPtrVector<clang::VarDecl*>::~TinyPtrVector()
Line
Count
Source
42
460k
  ~TinyPtrVector() {
43
460k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
18
      delete V;
45
460k
  }
llvm::TinyPtrVector<clang::ParmVarDecl*>::~TinyPtrVector()
Line
Count
Source
42
3
  ~TinyPtrVector() {
43
3
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
2
      delete V;
45
3
  }
llvm::TinyPtrVector<clang::NamedDecl*>::~TinyPtrVector()
Line
Count
Source
42
10.2k
  ~TinyPtrVector() {
43
10.2k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
5.30k
      delete V;
45
10.2k
  }
llvm::TinyPtrVector<clang::Module*>::~TinyPtrVector()
Line
Count
Source
42
1.29k
  ~TinyPtrVector() {
43
1.29k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
309
      delete V;
45
1.29k
  }
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::~TinyPtrVector()
Line
Count
Source
42
104k
  ~TinyPtrVector() {
43
104k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
199
      delete V;
45
104k
  }
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::~TinyPtrVector()
Line
Count
Source
42
14.1k
  ~TinyPtrVector() {
43
14.1k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
5.46k
      delete V;
45
14.1k
  }
llvm::TinyPtrVector<lld::elf::InputSection*>::~TinyPtrVector()
Line
Count
Source
42
394k
  ~TinyPtrVector() {
43
394k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
44
3
      delete V;
45
394k
  }
46
47
83.1M
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
48
83.1M
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
49
2.37M
      Val = new VecTy(*V);
50
83.1M
  }
llvm::TinyPtrVector<llvm::MachineInstr*>::TinyPtrVector(llvm::TinyPtrVector<llvm::MachineInstr*> const&)
Line
Count
Source
47
2
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
48
2
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
49
0
      Val = new VecTy(*V);
50
2
  }
llvm::TinyPtrVector<llvm::Value*>::TinyPtrVector(llvm::TinyPtrVector<llvm::Value*> const&)
Line
Count
Source
47
7.50k
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
48
7.50k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
49
6
      Val = new VecTy(*V);
50
7.50k
  }
llvm::TinyPtrVector<llvm::PHINode*>::TinyPtrVector(llvm::TinyPtrVector<llvm::PHINode*> const&)
Line
Count
Source
47
59
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
48
59
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
49
0
      Val = new VecTy(*V);
50
59
  }
llvm::TinyPtrVector<llvm::Function*>::TinyPtrVector(llvm::TinyPtrVector<llvm::Function*> const&)
Line
Count
Source
47
7
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
48
7
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
49
4
      Val = new VecTy(*V);
50
7
  }
llvm::TinyPtrVector<llvm::DISubprogram const*>::TinyPtrVector(llvm::TinyPtrVector<llvm::DISubprogram const*> const&)
Line
Count
Source
47
25
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
48
25
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
49
1
      Val = new VecTy(*V);
50
25
  }
llvm::TinyPtrVector<int*>::TinyPtrVector(llvm::TinyPtrVector<int*> const&)
Line
Count
Source
47
13
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
48
13
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
49
1
      Val = new VecTy(*V);
50
13
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::TinyPtrVector(llvm::TinyPtrVector<clang::ParsedAttr*> const&)
Line
Count
Source
47
83.1M
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
48
83.1M
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
49
2.37M
      Val = new VecTy(*V);
50
83.1M
  }
llvm::TinyPtrVector<clang::VarDecl*>::TinyPtrVector(llvm::TinyPtrVector<clang::VarDecl*> const&)
Line
Count
Source
47
5.98k
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
48
5.98k
    if (VecTy *V = Val.template dyn_cast<VecTy*>())
49
0
      Val = new VecTy(*V);
50
5.98k
  }
51
52
65.6k
  TinyPtrVector &operator=(const TinyPtrVector &RHS) {
53
65.6k
    if (this == &RHS)
54
0
      return *this;
55
65.6k
    if (RHS.empty()) {
56
64.5k
      this->clear();
57
64.5k
      return *this;
58
64.5k
    }
59
1.18k
60
1.18k
    // Try to squeeze into the single slot. If it won't fit, allocate a copied
61
1.18k
    // vector.
62
1.18k
    if (Val.template is<EltTy>()) {
63
1.18k
      if (RHS.size() == 1)
64
1.18k
        Val = RHS.front();
65
0
      else
66
0
        Val = new VecTy(*RHS.Val.template get<VecTy*>());
67
1.18k
      return *this;
68
1.18k
    }
69
0
70
0
    // If we have a full vector allocated, try to re-use it.
71
0
    if (RHS.Val.template is<EltTy>()) {
72
0
      Val.template get<VecTy*>()->clear();
73
0
      Val.template get<VecTy*>()->push_back(RHS.front());
74
0
    } else {
75
0
      *Val.template get<VecTy*>() = *RHS.Val.template get<VecTy*>();
76
0
    }
77
0
    return *this;
78
0
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::operator=(llvm::TinyPtrVector<llvm::BasicBlock*> const&)
Line
Count
Source
52
7
  TinyPtrVector &operator=(const TinyPtrVector &RHS) {
53
7
    if (this == &RHS)
54
0
      return *this;
55
7
    if (RHS.empty()) {
56
0
      this->clear();
57
0
      return *this;
58
0
    }
59
7
60
7
    // Try to squeeze into the single slot. If it won't fit, allocate a copied
61
7
    // vector.
62
7
    if (Val.template is<EltTy>()) {
63
7
      if (RHS.size() == 1)
64
7
        Val = RHS.front();
65
0
      else
66
0
        Val = new VecTy(*RHS.Val.template get<VecTy*>());
67
7
      return *this;
68
7
    }
69
0
70
0
    // If we have a full vector allocated, try to re-use it.
71
0
    if (RHS.Val.template is<EltTy>()) {
72
0
      Val.template get<VecTy*>()->clear();
73
0
      Val.template get<VecTy*>()->push_back(RHS.front());
74
0
    } else {
75
0
      *Val.template get<VecTy*>() = *RHS.Val.template get<VecTy*>();
76
0
    }
77
0
    return *this;
78
0
  }
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::operator=(llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*> const&)
Line
Count
Source
52
13
  TinyPtrVector &operator=(const TinyPtrVector &RHS) {
53
13
    if (this == &RHS)
54
0
      return *this;
55
13
    if (RHS.empty()) {
56
0
      this->clear();
57
0
      return *this;
58
0
    }
59
13
60
13
    // Try to squeeze into the single slot. If it won't fit, allocate a copied
61
13
    // vector.
62
13
    if (Val.template is<EltTy>()) {
63
13
      if (RHS.size() == 1)
64
13
        Val = RHS.front();
65
0
      else
66
0
        Val = new VecTy(*RHS.Val.template get<VecTy*>());
67
13
      return *this;
68
13
    }
69
0
70
0
    // If we have a full vector allocated, try to re-use it.
71
0
    if (RHS.Val.template is<EltTy>()) {
72
0
      Val.template get<VecTy*>()->clear();
73
0
      Val.template get<VecTy*>()->push_back(RHS.front());
74
0
    } else {
75
0
      *Val.template get<VecTy*>() = *RHS.Val.template get<VecTy*>();
76
0
    }
77
0
    return *this;
78
0
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::operator=(llvm::TinyPtrVector<clang::ParsedAttr*> const&)
Line
Count
Source
52
65.6k
  TinyPtrVector &operator=(const TinyPtrVector &RHS) {
53
65.6k
    if (this == &RHS)
54
0
      return *this;
55
65.6k
    if (RHS.empty()) {
56
64.5k
      this->clear();
57
64.5k
      return *this;
58
64.5k
    }
59
1.16k
60
1.16k
    // Try to squeeze into the single slot. If it won't fit, allocate a copied
61
1.16k
    // vector.
62
1.16k
    if (Val.template is<EltTy>()) {
63
1.16k
      if (RHS.size() == 1)
64
1.16k
        Val = RHS.front();
65
0
      else
66
0
        Val = new VecTy(*RHS.Val.template get<VecTy*>());
67
1.16k
      return *this;
68
1.16k
    }
69
0
70
0
    // If we have a full vector allocated, try to re-use it.
71
0
    if (RHS.Val.template is<EltTy>()) {
72
0
      Val.template get<VecTy*>()->clear();
73
0
      Val.template get<VecTy*>()->push_back(RHS.front());
74
0
    } else {
75
0
      *Val.template get<VecTy*>() = *RHS.Val.template get<VecTy*>();
76
0
    }
77
0
    return *this;
78
0
  }
79
80
129k
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
81
129k
    RHS.Val = (EltTy)nullptr;
82
129k
  }
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
80
3.72k
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
81
3.72k
    RHS.Val = (EltTy)nullptr;
82
3.72k
  }
llvm::TinyPtrVector<llvm::PHINode*>::TinyPtrVector(llvm::TinyPtrVector<llvm::PHINode*>&&)
Line
Count
Source
80
59
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
81
59
    RHS.Val = (EltTy)nullptr;
82
59
  }
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::TinyPtrVector(llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>&&)
Line
Count
Source
80
381
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
81
381
    RHS.Val = (EltTy)nullptr;
82
381
  }
Unexecuted instantiation: llvm::TinyPtrVector<llvm::Instruction*>::TinyPtrVector(llvm::TinyPtrVector<llvm::Instruction*>&&)
llvm::TinyPtrVector<void*>::TinyPtrVector(llvm::TinyPtrVector<void*>&&)
Line
Count
Source
80
1.46k
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
81
1.46k
    RHS.Val = (EltTy)nullptr;
82
1.46k
  }
llvm::TinyPtrVector<clang::serialization::ModuleFile*>::TinyPtrVector(llvm::TinyPtrVector<clang::serialization::ModuleFile*>&&)
Line
Count
Source
80
1.46k
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
81
1.46k
    RHS.Val = (EltTy)nullptr;
82
1.46k
  }
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
80
148
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
81
148
    RHS.Val = (EltTy)nullptr;
82
148
  }
llvm::TinyPtrVector<int*>::TinyPtrVector(llvm::TinyPtrVector<int*>&&)
Line
Count
Source
80
11
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
81
11
    RHS.Val = (EltTy)nullptr;
82
11
  }
Unexecuted instantiation: llvm::TinyPtrVector<clang::ObjCPropertyDecl*>::TinyPtrVector(llvm::TinyPtrVector<clang::ObjCPropertyDecl*>&&)
llvm::TinyPtrVector<clang::ParsedAttr*>::TinyPtrVector(llvm::TinyPtrVector<clang::ParsedAttr*>&&)
Line
Count
Source
80
971
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
81
971
    RHS.Val = (EltTy)nullptr;
82
971
  }
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
80
329
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
81
329
    RHS.Val = (EltTy)nullptr;
82
329
  }
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::TinyPtrVector(llvm::TinyPtrVector<clang::CXXMethodDecl const*>&&)
Line
Count
Source
80
101k
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
81
101k
    RHS.Val = (EltTy)nullptr;
82
101k
  }
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
80
18.8k
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
81
18.8k
    RHS.Val = (EltTy)nullptr;
82
18.8k
  }
83
84
1.97M
  TinyPtrVector &operator=(TinyPtrVector &&RHS) {
85
1.97M
    if (this == &RHS)
86
0
      return *this;
87
1.97M
    if (RHS.empty()) {
88
1.97M
      this->clear();
89
1.97M
      return *this;
90
1.97M
    }
91
267
92
267
    // If this vector has been allocated on the heap, re-use it if cheap. If it
93
267
    // would require more copying, just delete it and we'll steal the other
94
267
    // side.
95
267
    if (VecTy *V = Val.template dyn_cast<VecTy*>()) {
96
0
      if (RHS.Val.template is<EltTy>()) {
97
0
        V->clear();
98
0
        V->push_back(RHS.front());
99
0
        RHS.Val = (EltTy)nullptr;
100
0
        return *this;
101
0
      }
102
0
      delete V;
103
0
    }
104
267
105
267
    Val = RHS.Val;
106
267
    RHS.Val = (EltTy)nullptr;
107
267
    return *this;
108
267
  }
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
84
1.97M
  TinyPtrVector &operator=(TinyPtrVector &&RHS) {
85
1.97M
    if (this == &RHS)
86
0
      return *this;
87
1.97M
    if (RHS.empty()) {
88
1.97M
      this->clear();
89
1.97M
      return *this;
90
1.97M
    }
91
124
92
124
    // If this vector has been allocated on the heap, re-use it if cheap. If it
93
124
    // would require more copying, just delete it and we'll steal the other
94
124
    // side.
95
124
    if (VecTy *V = Val.template dyn_cast<VecTy*>()) {
96
0
      if (RHS.Val.template is<EltTy>()) {
97
0
        V->clear();
98
0
        V->push_back(RHS.front());
99
0
        RHS.Val = (EltTy)nullptr;
100
0
        return *this;
101
0
      }
102
0
      delete V;
103
0
    }
104
124
105
124
    Val = RHS.Val;
106
124
    RHS.Val = (EltTy)nullptr;
107
124
    return *this;
108
124
  }
llvm::TinyPtrVector<llvm::Value*>::operator=(llvm::TinyPtrVector<llvm::Value*>&&)
Line
Count
Source
84
202
  TinyPtrVector &operator=(TinyPtrVector &&RHS) {
85
202
    if (this == &RHS)
86
0
      return *this;
87
202
    if (RHS.empty()) {
88
59
      this->clear();
89
59
      return *this;
90
59
    }
91
143
92
143
    // If this vector has been allocated on the heap, re-use it if cheap. If it
93
143
    // would require more copying, just delete it and we'll steal the other
94
143
    // side.
95
143
    if (VecTy *V = Val.template dyn_cast<VecTy*>()) {
96
0
      if (RHS.Val.template is<EltTy>()) {
97
0
        V->clear();
98
0
        V->push_back(RHS.front());
99
0
        RHS.Val = (EltTy)nullptr;
100
0
        return *this;
101
0
      }
102
0
      delete V;
103
0
    }
104
143
105
143
    Val = RHS.Val;
106
143
    RHS.Val = (EltTy)nullptr;
107
143
    return *this;
108
143
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::operator=(llvm::TinyPtrVector<clang::ParsedAttr*>&&)
Line
Count
Source
84
146
  TinyPtrVector &operator=(TinyPtrVector &&RHS) {
85
146
    if (this == &RHS)
86
0
      return *this;
87
146
    if (RHS.empty()) {
88
146
      this->clear();
89
146
      return *this;
90
146
    }
91
0
92
0
    // If this vector has been allocated on the heap, re-use it if cheap. If it
93
0
    // would require more copying, just delete it and we'll steal the other
94
0
    // side.
95
0
    if (VecTy *V = Val.template dyn_cast<VecTy*>()) {
96
0
      if (RHS.Val.template is<EltTy>()) {
97
0
        V->clear();
98
0
        V->push_back(RHS.front());
99
0
        RHS.Val = (EltTy)nullptr;
100
0
        return *this;
101
0
      }
102
0
      delete V;
103
0
    }
104
0
105
0
    Val = RHS.Val;
106
0
    RHS.Val = (EltTy)nullptr;
107
0
    return *this;
108
0
  }
109
110
  TinyPtrVector(std::initializer_list<EltTy> IL)
111
      : Val(IL.size() == 0
112
                ? PtrUnion()
113
                : IL.size() == 1 ? PtrUnion(*IL.begin())
114
2.60k
                                 : PtrUnion(new VecTy(IL.begin(), IL.end()))) {}
115
116
  /// Constructor from an ArrayRef.
117
  ///
118
  /// This also is a constructor for individual array elements due to the single
119
  /// element constructor for ArrayRef.
120
  explicit TinyPtrVector(ArrayRef<EltTy> Elts)
121
      : Val(Elts.empty()
122
                ? PtrUnion()
123
                : Elts.size() == 1
124
                      ? PtrUnion(Elts[0])
125
                      : PtrUnion(new VecTy(Elts.begin(), Elts.end()))) {}
126
127
  TinyPtrVector(size_t Count, EltTy Value)
128
      : Val(Count == 0 ? PtrUnion()
129
                       : Count == 1 ? PtrUnion(Value)
130
                                    : PtrUnion(new VecTy(Count, Value))) {}
131
132
  // implicit conversion operator to ArrayRef.
133
13.8k
  operator ArrayRef<EltTy>() const {
134
13.8k
    if (Val.isNull())
135
0
      return None;
136
13.8k
    if (Val.template is<EltTy>())
137
13.6k
      return *Val.getAddrOfPtr1();
138
178
    return *Val.template get<VecTy*>();
139
178
  }
140
141
  // implicit conversion operator to MutableArrayRef.
142
60.2k
  operator MutableArrayRef<EltTy>() {
143
60.2k
    if (Val.isNull())
144
53.3k
      return None;
145
6.91k
    if (Val.template is<EltTy>())
146
6.41k
      return *Val.getAddrOfPtr1();
147
496
    return *Val.template get<VecTy*>();
148
496
  }
llvm::TinyPtrVector<llvm::MCSymbol*>::operator llvm::MutableArrayRef<llvm::MCSymbol*>()
Line
Count
Source
142
1.40k
  operator MutableArrayRef<EltTy>() {
143
1.40k
    if (Val.isNull())
144
0
      return None;
145
1.40k
    if (Val.template is<EltTy>())
146
1.40k
      return *Val.getAddrOfPtr1();
147
0
    return *Val.template get<VecTy*>();
148
0
  }
llvm::TinyPtrVector<llvm::Value*>::operator llvm::MutableArrayRef<llvm::Value*>()
Line
Count
Source
142
2.59k
  operator MutableArrayRef<EltTy>() {
143
2.59k
    if (Val.isNull())
144
0
      return None;
145
2.59k
    if (Val.template is<EltTy>())
146
2.59k
      return *Val.getAddrOfPtr1();
147
8
    return *Val.template get<VecTy*>();
148
8
  }
llvm::TinyPtrVector<clang::ModuleMacro*>::operator llvm::MutableArrayRef<clang::ModuleMacro*>()
Line
Count
Source
142
55.1k
  operator MutableArrayRef<EltTy>() {
143
55.1k
    if (Val.isNull())
144
53.2k
      return None;
145
1.81k
    if (Val.template is<EltTy>())
146
1.58k
      return *Val.getAddrOfPtr1();
147
231
    return *Val.template get<VecTy*>();
148
231
  }
llvm::TinyPtrVector<clang::Module*>::operator llvm::MutableArrayRef<clang::Module*>()
Line
Count
Source
142
1.08k
  operator MutableArrayRef<EltTy>() {
143
1.08k
    if (Val.isNull())
144
0
      return None;
145
1.08k
    if (Val.template is<EltTy>())
146
829
      return *Val.getAddrOfPtr1();
147
256
    return *Val.template get<VecTy*>();
148
256
  }
llvm::TinyPtrVector<lld::elf::InputSection*>::operator llvm::MutableArrayRef<lld::elf::InputSection*>()
Line
Count
Source
142
25
  operator MutableArrayRef<EltTy>() {
143
25
    if (Val.isNull())
144
20
      return None;
145
5
    if (Val.template is<EltTy>())
146
4
      return *Val.getAddrOfPtr1();
147
1
    return *Val.template get<VecTy*>();
148
1
  }
149
150
  // Implicit conversion to ArrayRef<U> if EltTy* implicitly converts to U*.
151
  template<typename U,
152
           typename std::enable_if<
153
               std::is_convertible<ArrayRef<EltTy>, ArrayRef<U>>::value,
154
               bool>::type = false>
155
  operator ArrayRef<U>() const {
156
    return operator ArrayRef<EltTy>();
157
  }
158
159
114M
  bool empty() const {
160
114M
    // This vector can be empty if it contains no element, or if it
161
114M
    // contains a pointer to an empty vector.
162
114M
    if (Val.isNull()) 
return true107M
;
163
6.28M
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
164
4.62M
      return Vec->empty();
165
1.66M
    return false;
166
1.66M
  }
llvm::TinyPtrVector<llvm::AnalysisKey*>::empty() const
Line
Count
Source
159
280
  bool empty() const {
160
280
    // This vector can be empty if it contains no element, or if it
161
280
    // contains a pointer to an empty vector.
162
280
    if (Val.isNull()) 
return true242
;
163
38
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
164
0
      return Vec->empty();
165
38
    return false;
166
38
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::empty() const
Line
Count
Source
159
956
  bool empty() const {
160
956
    // This vector can be empty if it contains no element, or if it
161
956
    // contains a pointer to an empty vector.
162
956
    if (Val.isNull()) 
return true0
;
163
956
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
164
58
      return Vec->empty();
165
898
    return false;
166
898
  }
llvm::TinyPtrVector<llvm::MCSymbol*>::empty() const
Line
Count
Source
159
1.40k
  bool empty() const {
160
1.40k
    // This vector can be empty if it contains no element, or if it
161
1.40k
    // contains a pointer to an empty vector.
162
1.40k
    if (Val.isNull()) 
return true569
;
163
839
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
164
0
      return Vec->empty();
165
839
    return false;
166
839
  }
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::empty() const
Line
Count
Source
159
3.07M
  bool empty() const {
160
3.07M
    // This vector can be empty if it contains no element, or if it
161
3.07M
    // contains a pointer to an empty vector.
162
3.07M
    if (Val.isNull()) 
return true3.07M
;
163
306
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
164
2
      return Vec->empty();
165
304
    return false;
166
304
  }
llvm::TinyPtrVector<llvm::Value*>::empty() const
Line
Count
Source
159
422
  bool empty() const {
160
422
    // This vector can be empty if it contains no element, or if it
161
422
    // contains a pointer to an empty vector.
162
422
    if (Val.isNull()) 
return true127
;
163
295
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
164
22
      return Vec->empty();
165
273
    return false;
166
273
  }
llvm::TinyPtrVector<llvm::Instruction*>::empty() const
Line
Count
Source
159
7.60k
  bool empty() const {
160
7.60k
    // This vector can be empty if it contains no element, or if it
161
7.60k
    // contains a pointer to an empty vector.
162
7.60k
    if (Val.isNull()) 
return true0
;
163
7.60k
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
164
4.95k
      return Vec->empty();
165
2.65k
    return false;
166
2.65k
  }
llvm::TinyPtrVector<clang::serialization::ModuleFile*>::empty() const
Line
Count
Source
159
30.8k
  bool empty() const {
160
30.8k
    // This vector can be empty if it contains no element, or if it
161
30.8k
    // contains a pointer to an empty vector.
162
30.8k
    if (Val.isNull()) 
return true30.5k
;
163
330
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
164
330
      return Vec->empty();
165
0
    return false;
166
0
  }
llvm::TinyPtrVector<void*>::empty() const
Line
Count
Source
159
116k
  bool empty() const {
160
116k
    // This vector can be empty if it contains no element, or if it
161
116k
    // contains a pointer to an empty vector.
162
116k
    if (Val.isNull()) 
return true2.93k
;
163
113k
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
164
20.3k
      return Vec->empty();
165
92.9k
    return false;
166
92.9k
  }
llvm::TinyPtrVector<clang::ObjCPropertyDecl*>::empty() const
Line
Count
Source
159
112
  bool empty() const {
160
112
    // This vector can be empty if it contains no element, or if it
161
112
    // contains a pointer to an empty vector.
162
112
    if (Val.isNull()) 
return true0
;
163
112
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
164
18
      return Vec->empty();
165
94
    return false;
166
94
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::empty() const
Line
Count
Source
159
110M
  bool empty() const {
160
110M
    // This vector can be empty if it contains no element, or if it
161
110M
    // contains a pointer to an empty vector.
162
110M
    if (Val.isNull()) 
return true104M
;
163
6.16M
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
164
4.59M
      return Vec->empty();
165
1.56M
    return false;
166
1.56M
  }
llvm::TinyPtrVector<clang::ParmVarDecl*>::empty() const
Line
Count
Source
159
3
  bool empty() const {
160
3
    // This vector can be empty if it contains no element, or if it
161
3
    // contains a pointer to an empty vector.
162
3
    if (Val.isNull()) 
return true0
;
163
3
    if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
164
2
      return Vec->empty();
165
1
    return false;
166
1
  }
167
168
5.39M
  unsigned size() const {
169
5.39M
    if (empty())
170
5.35M
      return 0;
171
36.0k
    if (Val.template is<EltTy>())
172
28.5k
      return 1;
173
7.46k
    return Val.template get<VecTy*>()->size();
174
7.46k
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::size() const
Line
Count
Source
168
949
  unsigned size() const {
169
949
    if (empty())
170
0
      return 0;
171
949
    if (Val.template is<EltTy>())
172
891
      return 1;
173
58
    return Val.template get<VecTy*>()->size();
174
58
  }
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::size() const
Line
Count
Source
168
13
  unsigned size() const {
169
13
    if (empty())
170
0
      return 0;
171
13
    if (Val.template is<EltTy>())
172
13
      return 1;
173
0
    return Val.template get<VecTy*>()->size();
174
0
  }
llvm::TinyPtrVector<llvm::Instruction*>::size() const
Line
Count
Source
168
2.89k
  unsigned size() const {
169
2.89k
    if (empty())
170
0
      return 0;
171
2.89k
    if (Val.template is<EltTy>())
172
1.32k
      return 1;
173
1.57k
    return Val.template get<VecTy*>()->size();
174
1.57k
  }
llvm::TinyPtrVector<void*>::size() const
Line
Count
Source
168
30.7k
  unsigned size() const {
169
30.7k
    if (empty())
170
0
      return 0;
171
30.7k
    if (Val.template is<EltTy>())
172
24.9k
      return 1;
173
5.81k
    return Val.template get<VecTy*>()->size();
174
5.81k
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::size() const
Line
Count
Source
168
5.35M
  unsigned size() const {
169
5.35M
    if (empty())
170
5.35M
      return 0;
171
1.40k
    if (Val.template is<EltTy>())
172
1.39k
      return 1;
173
15
    return Val.template get<VecTy*>()->size();
174
15
  }
llvm::TinyPtrVector<clang::ParmVarDecl*>::size() const
Line
Count
Source
168
3
  unsigned size() const {
169
3
    if (empty())
170
0
      return 0;
171
3
    if (Val.template is<EltTy>())
172
1
      return 1;
173
2
    return Val.template get<VecTy*>()->size();
174
2
  }
175
176
  using iterator = EltTy *;
177
  using const_iterator = const EltTy *;
178
  using reverse_iterator = std::reverse_iterator<iterator>;
179
  using const_reverse_iterator = std::reverse_iterator<const_iterator>;
180
181
940M
  iterator begin() {
182
940M
    if (Val.template is<EltTy>())
183
926M
      return Val.getAddrOfPtr1();
184
14.4M
185
14.4M
    return Val.template get<VecTy *>()->begin();
186
14.4M
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::begin()
Line
Count
Source
181
927M
  iterator begin() {
182
927M
    if (Val.template is<EltTy>())
183
912M
      return Val.getAddrOfPtr1();
184
14.4M
185
14.4M
    return Val.template get<VecTy *>()->begin();
186
14.4M
  }
llvm::TinyPtrVector<llvm::AnalysisKey*>::begin()
Line
Count
Source
181
2.71k
  iterator begin() {
182
2.71k
    if (Val.template is<EltTy>())
183
2.71k
      return Val.getAddrOfPtr1();
184
0
185
0
    return Val.template get<VecTy *>()->begin();
186
0
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::begin()
Line
Count
Source
181
9.80k
  iterator begin() {
182
9.80k
    if (Val.template is<EltTy>())
183
9.73k
      return Val.getAddrOfPtr1();
184
66
185
66
    return Val.template get<VecTy *>()->begin();
186
66
  }
Unexecuted instantiation: llvm::TinyPtrVector<llvm::MCSymbol*>::begin()
llvm::TinyPtrVector<llvm::MachineInstr*>::begin()
Line
Count
Source
181
212k
  iterator begin() {
182
212k
    if (Val.template is<EltTy>())
183
212k
      return Val.getAddrOfPtr1();
184
0
185
0
    return Val.template get<VecTy *>()->begin();
186
0
  }
llvm::TinyPtrVector<llvm::Metadata*>::begin()
Line
Count
Source
181
226
  iterator begin() {
182
226
    if (Val.template is<EltTy>())
183
226
      return Val.getAddrOfPtr1();
184
0
185
0
    return Val.template get<VecTy *>()->begin();
186
0
  }
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::begin()
Line
Count
Source
181
4.66M
  iterator begin() {
182
4.66M
    if (Val.template is<EltTy>())
183
4.66M
      return Val.getAddrOfPtr1();
184
6
185
6
    return Val.template get<VecTy *>()->begin();
186
6
  }
llvm::TinyPtrVector<llvm::Value*>::begin()
Line
Count
Source
181
124
  iterator begin() {
182
124
    if (Val.template is<EltTy>())
183
122
      return Val.getAddrOfPtr1();
184
2
185
2
    return Val.template get<VecTy *>()->begin();
186
2
  }
llvm::TinyPtrVector<llvm::PHINode*>::begin()
Line
Count
Source
181
177
  iterator begin() {
182
177
    if (Val.template is<EltTy>())
183
177
      return Val.getAddrOfPtr1();
184
0
185
0
    return Val.template get<VecTy *>()->begin();
186
0
  }
llvm::TinyPtrVector<llvm::Instruction*>::begin()
Line
Count
Source
181
1.59k
  iterator begin() {
182
1.59k
    if (Val.template is<EltTy>())
183
0
      return Val.getAddrOfPtr1();
184
1.59k
185
1.59k
    return Val.template get<VecTy *>()->begin();
186
1.59k
  }
llvm::TinyPtrVector<llvm::Function*>::begin()
Line
Count
Source
181
10
  iterator begin() {
182
10
    if (Val.template is<EltTy>())
183
6
      return Val.getAddrOfPtr1();
184
4
185
4
    return Val.template get<VecTy *>()->begin();
186
4
  }
llvm::TinyPtrVector<clang::serialization::ModuleFile*>::begin()
Line
Count
Source
181
12.5k
  iterator begin() {
182
12.5k
    if (Val.template is<EltTy>())
183
12.0k
      return Val.getAddrOfPtr1();
184
489
185
489
    return Val.template get<VecTy *>()->begin();
186
489
  }
llvm::TinyPtrVector<void*>::begin()
Line
Count
Source
181
160k
  iterator begin() {
182
160k
    if (Val.template is<EltTy>())
183
138k
      return Val.getAddrOfPtr1();
184
21.7k
185
21.7k
    return Val.template get<VecTy *>()->begin();
186
21.7k
  }
llvm::TinyPtrVector<llvm::DISubprogram const*>::begin()
Line
Count
Source
181
144
  iterator begin() {
182
144
    if (Val.template is<EltTy>())
183
142
      return Val.getAddrOfPtr1();
184
2
185
2
    return Val.template get<VecTy *>()->begin();
186
2
  }
llvm::TinyPtrVector<int*>::begin()
Line
Count
Source
181
1.60k
  iterator begin() {
182
1.60k
    if (Val.template is<EltTy>())
183
120
      return Val.getAddrOfPtr1();
184
1.48k
185
1.48k
    return Val.template get<VecTy *>()->begin();
186
1.48k
  }
llvm::TinyPtrVector<clang::ObjCPropertyDecl*>::begin()
Line
Count
Source
181
412
  iterator begin() {
182
412
    if (Val.template is<EltTy>())
183
376
      return Val.getAddrOfPtr1();
184
36
185
36
    return Val.template get<VecTy *>()->begin();
186
36
  }
llvm::TinyPtrVector<clang::VarDecl*>::begin()
Line
Count
Source
181
7.21M
  iterator begin() {
182
7.21M
    if (Val.template is<EltTy>())
183
7.21M
      return Val.getAddrOfPtr1();
184
768
185
768
    return Val.template get<VecTy *>()->begin();
186
768
  }
llvm::TinyPtrVector<clang::NamedDecl*>::begin()
Line
Count
Source
181
12.3k
  iterator begin() {
182
12.3k
    if (Val.template is<EltTy>())
183
10.9k
      return Val.getAddrOfPtr1();
184
1.41k
185
1.41k
    return Val.template get<VecTy *>()->begin();
186
1.41k
  }
llvm::TinyPtrVector<clang::Module*>::begin()
Line
Count
Source
181
2.55k
  iterator begin() {
182
2.55k
    if (Val.template is<EltTy>())
183
1.97k
      return Val.getAddrOfPtr1();
184
580
185
580
    return Val.template get<VecTy *>()->begin();
186
580
  }
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::begin()
Line
Count
Source
181
1.09M
  iterator begin() {
182
1.09M
    if (Val.template is<EltTy>())
183
1.08M
      return Val.getAddrOfPtr1();
184
6.53k
185
6.53k
    return Val.template get<VecTy *>()->begin();
186
6.53k
  }
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::begin()
Line
Count
Source
181
69.6k
  iterator begin() {
182
69.6k
    if (Val.template is<EltTy>())
183
64.5k
      return Val.getAddrOfPtr1();
184
5.04k
185
5.04k
    return Val.template get<VecTy *>()->begin();
186
5.04k
  }
llvm::TinyPtrVector<clang::ModuleMacro*>::begin()
Line
Count
Source
181
14.3k
  iterator begin() {
182
14.3k
    if (Val.template is<EltTy>())
183
13.7k
      return Val.getAddrOfPtr1();
184
558
185
558
    return Val.template get<VecTy *>()->begin();
186
558
  }
llvm::TinyPtrVector<lld::elf::InputSection*>::begin()
Line
Count
Source
181
695
  iterator begin() {
182
695
    if (Val.template is<EltTy>())
183
694
      return Val.getAddrOfPtr1();
184
1
185
1
    return Val.template get<VecTy *>()->begin();
186
1
  }
187
188
477M
  iterator end() {
189
477M
    if (Val.template is<EltTy>())
190
462M
      return begin() + (Val.isNull() ? 
0456M
:
16.03M
);
191
14.7M
192
14.7M
    return Val.template get<VecTy *>()->end();
193
14.7M
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::end()
Line
Count
Source
188
470M
  iterator end() {
189
470M
    if (Val.template is<EltTy>())
190
455M
      return begin() + (Val.isNull() ? 
0450M
:
15.42M
);
191
14.7M
192
14.7M
    return Val.template get<VecTy *>()->end();
193
14.7M
  }
llvm::TinyPtrVector<llvm::AnalysisKey*>::end()
Line
Count
Source
188
1.67k
  iterator end() {
189
1.67k
    if (Val.template is<EltTy>())
190
1.67k
      return begin() + (Val.isNull() ? 
0960
:
1716
);
191
0
192
0
    return Val.template get<VecTy *>()->end();
193
0
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::end()
Line
Count
Source
188
6.28k
  iterator end() {
189
6.28k
    if (Val.template is<EltTy>())
190
6.19k
      return begin() + (Val.isNull() ? 
04.23k
:
11.95k
);
191
87
192
87
    return Val.template get<VecTy *>()->end();
193
87
  }
Unexecuted instantiation: llvm::TinyPtrVector<llvm::MCSymbol*>::end()
llvm::TinyPtrVector<llvm::MachineInstr*>::end()
Line
Count
Source
188
106k
  iterator end() {
189
106k
    if (Val.template is<EltTy>())
190
106k
      return begin() + (Val.isNull() ? 
0106k
:
12
);
191
0
192
0
    return Val.template get<VecTy *>()->end();
193
0
  }
llvm::TinyPtrVector<llvm::Metadata*>::end()
Line
Count
Source
188
113
  iterator end() {
189
113
    if (Val.template is<EltTy>())
190
113
      return begin() + (Val.isNull() ? 
030
:
183
);
191
0
192
0
    return Val.template get<VecTy *>()->end();
193
0
  }
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::end()
Line
Count
Source
188
2.33M
  iterator end() {
189
2.33M
    if (Val.template is<EltTy>())
190
2.33M
      return begin() + (Val.isNull() ? 
02.33M
:
1257
);
191
6
192
6
    return Val.template get<VecTy *>()->end();
193
6
  }
llvm::TinyPtrVector<llvm::Value*>::end()
Line
Count
Source
188
63
  iterator end() {
189
63
    if (Val.template is<EltTy>())
190
61
      return begin() + (Val.isNull() ? 
00
: 1);
191
2
192
2
    return Val.template get<VecTy *>()->end();
193
2
  }
llvm::TinyPtrVector<llvm::PHINode*>::end()
Line
Count
Source
188
118
  iterator end() {
189
118
    if (Val.template is<EltTy>())
190
118
      return begin() + (Val.isNull() ? 
00
: 1);
191
0
192
0
    return Val.template get<VecTy *>()->end();
193
0
  }
llvm::TinyPtrVector<llvm::Instruction*>::end()
Line
Count
Source
188
1.59k
  iterator end() {
189
1.59k
    if (Val.template is<EltTy>())
190
0
      return begin() + (Val.isNull() ? 0 : 1);
191
1.59k
192
1.59k
    return Val.template get<VecTy *>()->end();
193
1.59k
  }
llvm::TinyPtrVector<llvm::Function*>::end()
Line
Count
Source
188
7
  iterator end() {
189
7
    if (Val.template is<EltTy>())
190
3
      return begin() + (Val.isNull() ? 
00
: 1);
191
4
192
4
    return Val.template get<VecTy *>()->end();
193
4
  }
llvm::TinyPtrVector<clang::serialization::ModuleFile*>::end()
Line
Count
Source
188
12.6k
  iterator end() {
189
12.6k
    if (Val.template is<EltTy>())
190
12.0k
      return begin() + (Val.isNull() ? 0 : 
10
);
191
670
192
670
    return Val.template get<VecTy *>()->end();
193
670
  }
llvm::TinyPtrVector<void*>::end()
Line
Count
Source
188
42.6k
  iterator end() {
189
42.6k
    if (Val.template is<EltTy>())
190
35.3k
      return begin() + (Val.isNull() ? 
01.46k
:
133.8k
);
191
7.31k
192
7.31k
    return Val.template get<VecTy *>()->end();
193
7.31k
  }
llvm::TinyPtrVector<llvm::DISubprogram const*>::end()
Line
Count
Source
188
73
  iterator end() {
189
73
    if (Val.template is<EltTy>())
190
71
      return begin() + (Val.isNull() ? 
00
: 1);
191
2
192
2
    return Val.template get<VecTy *>()->end();
193
2
  }
llvm::TinyPtrVector<int*>::end()
Line
Count
Source
188
182
  iterator end() {
189
182
    if (Val.template is<EltTy>())
190
55
      return begin() + (Val.isNull() ? 
028
:
127
);
191
127
192
127
    return Val.template get<VecTy *>()->end();
193
127
  }
llvm::TinyPtrVector<clang::ObjCPropertyDecl*>::end()
Line
Count
Source
188
224
  iterator end() {
189
224
    if (Val.template is<EltTy>())
190
188
      return begin() + (Val.isNull() ? 
00
: 1);
191
36
192
36
    return Val.template get<VecTy *>()->end();
193
36
  }
llvm::TinyPtrVector<clang::VarDecl*>::end()
Line
Count
Source
188
3.60M
  iterator end() {
189
3.60M
    if (Val.template is<EltTy>())
190
3.60M
      return begin() + (Val.isNull() ? 
03.60M
:
1145
);
191
769
192
769
    return Val.template get<VecTy *>()->end();
193
769
  }
llvm::TinyPtrVector<clang::NamedDecl*>::end()
Line
Count
Source
188
6.86k
  iterator end() {
189
6.86k
    if (Val.template is<EltTy>())
190
5.45k
      return begin() + (Val.isNull() ? 
00
: 1);
191
1.41k
192
1.41k
    return Val.template get<VecTy *>()->end();
193
1.41k
  }
llvm::TinyPtrVector<clang::Module*>::end()
Line
Count
Source
188
1.99k
  iterator end() {
189
1.99k
    if (Val.template is<EltTy>())
190
1.12k
      return begin() + (Val.isNull() ? 
00
: 1);
191
866
192
866
    return Val.template get<VecTy *>()->end();
193
866
  }
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::end()
Line
Count
Source
188
550k
  iterator end() {
189
550k
    if (Val.template is<EltTy>())
190
543k
      return begin() + (Val.isNull() ? 
00
: 1);
191
6.53k
192
6.53k
    return Val.template get<VecTy *>()->end();
193
6.53k
  }
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::end()
Line
Count
Source
188
53.1k
  iterator end() {
189
53.1k
    if (Val.template is<EltTy>())
190
43.0k
      return begin() + (Val.isNull() ? 
028.2k
:
114.8k
);
191
10.0k
192
10.0k
    return Val.template get<VecTy *>()->end();
193
10.0k
  }
llvm::TinyPtrVector<clang::ModuleMacro*>::end()
Line
Count
Source
188
9.12k
  iterator end() {
189
9.12k
    if (Val.template is<EltTy>())
190
8.54k
      return begin() + (Val.isNull() ? 
06.09k
:
12.45k
);
191
573
192
573
    return Val.template get<VecTy *>()->end();
193
573
  }
llvm::TinyPtrVector<lld::elf::InputSection*>::end()
Line
Count
Source
188
348
  iterator end() {
189
348
    if (Val.template is<EltTy>())
190
347
      return begin() + (Val.isNull() ? 
0330
:
117
);
191
1
192
1
    return Val.template get<VecTy *>()->end();
193
1
  }
194
195
114M
  const_iterator begin() const {
196
114M
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
197
114M
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::begin() const
Line
Count
Source
195
110M
  const_iterator begin() const {
196
110M
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
197
110M
  }
llvm::TinyPtrVector<llvm::AnalysisKey*>::begin() const
Line
Count
Source
195
118
  const_iterator begin() const {
196
118
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
197
118
  }
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::begin() const
Line
Count
Source
195
23.1k
  const_iterator begin() const {
196
23.1k
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
197
23.1k
  }
llvm::TinyPtrVector<llvm::Function*>::begin() const
Line
Count
Source
195
7
  const_iterator begin() const {
196
7
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
197
7
  }
llvm::TinyPtrVector<void*>::begin() const
Line
Count
Source
195
82.5k
  const_iterator begin() const {
196
82.5k
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
197
82.5k
  }
llvm::TinyPtrVector<clang::VarDecl*>::begin() const
Line
Count
Source
195
3.60M
  const_iterator begin() const {
196
3.60M
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
197
3.60M
  }
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::begin() const
Line
Count
Source
195
550k
  const_iterator begin() const {
196
550k
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
197
550k
  }
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::begin() const
Line
Count
Source
195
2.31k
  const_iterator begin() const {
196
2.31k
    return (const_iterator)const_cast<TinyPtrVector*>(this)->begin();
197
2.31k
  }
198
199
117M
  const_iterator end() const {
200
117M
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
201
117M
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::end() const
Line
Count
Source
199
113M
  const_iterator end() const {
200
113M
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
201
113M
  }
llvm::TinyPtrVector<llvm::AnalysisKey*>::end() const
Line
Count
Source
199
118
  const_iterator end() const {
200
118
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
201
118
  }
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::end() const
Line
Count
Source
199
23.1k
  const_iterator end() const {
200
23.1k
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
201
23.1k
  }
llvm::TinyPtrVector<llvm::Function*>::end() const
Line
Count
Source
199
7
  const_iterator end() const {
200
7
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
201
7
  }
llvm::TinyPtrVector<clang::VarDecl*>::end() const
Line
Count
Source
199
3.60M
  const_iterator end() const {
200
3.60M
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
201
3.60M
  }
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::end() const
Line
Count
Source
199
550k
  const_iterator end() const {
200
550k
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
201
550k
  }
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::end() const
Line
Count
Source
199
4.63k
  const_iterator end() const {
200
4.63k
    return (const_iterator)const_cast<TinyPtrVector*>(this)->end();
201
4.63k
  }
202
203
  reverse_iterator rbegin() { return reverse_iterator(end()); }
204
  reverse_iterator rend() { return reverse_iterator(begin()); }
205
206
  const_reverse_iterator rbegin() const {
207
    return const_reverse_iterator(end());
208
  }
209
210
  const_reverse_iterator rend() const {
211
    return const_reverse_iterator(begin());
212
  }
213
214
8
  EltTy operator[](unsigned i) const {
215
8
    assert(!Val.isNull() && "can't index into an empty vector");
216
8
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
217
1
      assert(i == 0 && "tinyvector index out of range");
218
1
      return V;
219
1
    }
220
7
221
7
    assert(i < Val.template get<VecTy*>()->size() &&
222
7
           "tinyvector index out of range");
223
7
    return (*Val.template get<VecTy*>())[i];
224
7
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::operator[](unsigned int) const
Line
Count
Source
214
3
  EltTy operator[](unsigned i) const {
215
3
    assert(!Val.isNull() && "can't index into an empty vector");
216
3
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
217
0
      assert(i == 0 && "tinyvector index out of range");
218
0
      return V;
219
0
    }
220
3
221
3
    assert(i < Val.template get<VecTy*>()->size() &&
222
3
           "tinyvector index out of range");
223
3
    return (*Val.template get<VecTy*>())[i];
224
3
  }
llvm::TinyPtrVector<clang::ParmVarDecl*>::operator[](unsigned int) const
Line
Count
Source
214
5
  EltTy operator[](unsigned i) const {
215
5
    assert(!Val.isNull() && "can't index into an empty vector");
216
5
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
217
1
      assert(i == 0 && "tinyvector index out of range");
218
1
      return V;
219
1
    }
220
4
221
4
    assert(i < Val.template get<VecTy*>()->size() &&
222
4
           "tinyvector index out of range");
223
4
    return (*Val.template get<VecTy*>())[i];
224
4
  }
225
226
2.11k
  EltTy front() const {
227
2.11k
    assert(!empty() && "vector empty");
228
2.11k
    if (EltTy V = Val.template dyn_cast<EltTy>())
229
2.08k
      return V;
230
29
    return Val.template get<VecTy*>()->front();
231
29
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::front() const
Line
Count
Source
226
692
  EltTy front() const {
227
692
    assert(!empty() && "vector empty");
228
692
    if (EltTy V = Val.template dyn_cast<EltTy>())
229
690
      return V;
230
2
    return Val.template get<VecTy*>()->front();
231
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
226
178
  EltTy front() const {
227
178
    assert(!empty() && "vector empty");
228
178
    if (EltTy V = Val.template dyn_cast<EltTy>())
229
178
      return V;
230
0
    return Val.template get<VecTy*>()->front();
231
0
  }
Unexecuted instantiation: llvm::TinyPtrVector<llvm::Value*>::front() const
llvm::TinyPtrVector<clang::ObjCPropertyDecl*>::front() const
Line
Count
Source
226
79
  EltTy front() const {
227
79
    assert(!empty() && "vector empty");
228
79
    if (EltTy V = Val.template dyn_cast<EltTy>())
229
52
      return V;
230
27
    return Val.template get<VecTy*>()->front();
231
27
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::front() const
Line
Count
Source
226
1.16k
  EltTy front() const {
227
1.16k
    assert(!empty() && "vector empty");
228
1.16k
    if (EltTy V = Val.template dyn_cast<EltTy>())
229
1.16k
      return V;
230
0
    return Val.template get<VecTy*>()->front();
231
0
  }
232
233
21
  EltTy back() const {
234
21
    assert(!empty() && "vector empty");
235
21
    if (EltTy V = Val.template dyn_cast<EltTy>())
236
20
      return V;
237
1
    return Val.template get<VecTy*>()->back();
238
1
  }
239
240
14.5M
  void push_back(EltTy NewVal) {
241
14.5M
    assert(NewVal && "Can't add a null value");
242
14.5M
243
14.5M
    // If we have nothing, add something.
244
14.5M
    if (Val.isNull()) {
245
6.88M
      Val = NewVal;
246
6.88M
      return;
247
6.88M
    }
248
7.68M
249
7.68M
    // If we have a single value, convert to a vector.
250
7.68M
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
4.64M
      Val = new VecTy();
252
4.64M
      Val.template get<VecTy*>()->push_back(V);
253
4.64M
    }
254
7.68M
255
7.68M
    // Add the new value, we know we have a vector.
256
7.68M
    Val.template get<VecTy*>()->push_back(NewVal);
257
7.68M
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::push_back(llvm::BasicBlock*)
Line
Count
Source
240
2.17k
  void push_back(EltTy NewVal) {
241
2.17k
    assert(NewVal && "Can't add a null value");
242
2.17k
243
2.17k
    // If we have nothing, add something.
244
2.17k
    if (Val.isNull()) {
245
2.14k
      Val = NewVal;
246
2.14k
      return;
247
2.14k
    }
248
26
249
26
    // If we have a single value, convert to a vector.
250
26
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
22
      Val = new VecTy();
252
22
      Val.template get<VecTy*>()->push_back(V);
253
22
    }
254
26
255
26
    // Add the new value, we know we have a vector.
256
26
    Val.template get<VecTy*>()->push_back(NewVal);
257
26
  }
llvm::TinyPtrVector<llvm::MCSymbol*>::push_back(llvm::MCSymbol*)
Line
Count
Source
240
569
  void push_back(EltTy NewVal) {
241
569
    assert(NewVal && "Can't add a null value");
242
569
243
569
    // If we have nothing, add something.
244
569
    if (Val.isNull()) {
245
569
      Val = NewVal;
246
569
      return;
247
569
    }
248
0
249
0
    // If we have a single value, convert to a vector.
250
0
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
0
      Val = new VecTy();
252
0
      Val.template get<VecTy*>()->push_back(V);
253
0
    }
254
0
255
0
    // Add the new value, we know we have a vector.
256
0
    Val.template get<VecTy*>()->push_back(NewVal);
257
0
  }
llvm::TinyPtrVector<llvm::MachineInstr*>::push_back(llvm::MachineInstr*)
Line
Count
Source
240
85
  void push_back(EltTy NewVal) {
241
85
    assert(NewVal && "Can't add a null value");
242
85
243
85
    // If we have nothing, add something.
244
85
    if (Val.isNull()) {
245
63
      Val = NewVal;
246
63
      return;
247
63
    }
248
22
249
22
    // If we have a single value, convert to a vector.
250
22
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
15
      Val = new VecTy();
252
15
      Val.template get<VecTy*>()->push_back(V);
253
15
    }
254
22
255
22
    // Add the new value, we know we have a vector.
256
22
    Val.template get<VecTy*>()->push_back(NewVal);
257
22
  }
llvm::TinyPtrVector<llvm::Metadata*>::push_back(llvm::Metadata*)
Line
Count
Source
240
107
  void push_back(EltTy NewVal) {
241
107
    assert(NewVal && "Can't add a null value");
242
107
243
107
    // If we have nothing, add something.
244
107
    if (Val.isNull()) {
245
107
      Val = NewVal;
246
107
      return;
247
107
    }
248
0
249
0
    // If we have a single value, convert to a vector.
250
0
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
0
      Val = new VecTy();
252
0
      Val.template get<VecTy*>()->push_back(V);
253
0
    }
254
0
255
0
    // Add the new value, we know we have a vector.
256
0
    Val.template get<VecTy*>()->push_back(NewVal);
257
0
  }
llvm::TinyPtrVector<llvm::Value*>::push_back(llvm::Value*)
Line
Count
Source
240
301
  void push_back(EltTy NewVal) {
241
301
    assert(NewVal && "Can't add a null value");
242
301
243
301
    // If we have nothing, add something.
244
301
    if (Val.isNull()) {
245
283
      Val = NewVal;
246
283
      return;
247
283
    }
248
18
249
18
    // If we have a single value, convert to a vector.
250
18
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
14
      Val = new VecTy();
252
14
      Val.template get<VecTy*>()->push_back(V);
253
14
    }
254
18
255
18
    // Add the new value, we know we have a vector.
256
18
    Val.template get<VecTy*>()->push_back(NewVal);
257
18
  }
llvm::TinyPtrVector<llvm::PHINode*>::push_back(llvm::PHINode*)
Line
Count
Source
240
59
  void push_back(EltTy NewVal) {
241
59
    assert(NewVal && "Can't add a null value");
242
59
243
59
    // If we have nothing, add something.
244
59
    if (Val.isNull()) {
245
59
      Val = NewVal;
246
59
      return;
247
59
    }
248
0
249
0
    // If we have a single value, convert to a vector.
250
0
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
0
      Val = new VecTy();
252
0
      Val.template get<VecTy*>()->push_back(V);
253
0
    }
254
0
255
0
    // Add the new value, we know we have a vector.
256
0
    Val.template get<VecTy*>()->push_back(NewVal);
257
0
  }
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::push_back(llvm::DbgVariableIntrinsic*)
Line
Count
Source
240
286
  void push_back(EltTy NewVal) {
241
286
    assert(NewVal && "Can't add a null value");
242
286
243
286
    // If we have nothing, add something.
244
286
    if (Val.isNull()) {
245
284
      Val = NewVal;
246
284
      return;
247
284
    }
248
2
249
2
    // If we have a single value, convert to a vector.
250
2
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
2
      Val = new VecTy();
252
2
      Val.template get<VecTy*>()->push_back(V);
253
2
    }
254
2
255
2
    // Add the new value, we know we have a vector.
256
2
    Val.template get<VecTy*>()->push_back(NewVal);
257
2
  }
llvm::TinyPtrVector<llvm::Instruction*>::push_back(llvm::Instruction*)
Line
Count
Source
240
4.71k
  void push_back(EltTy NewVal) {
241
4.71k
    assert(NewVal && "Can't add a null value");
242
4.71k
243
4.71k
    // If we have nothing, add something.
244
4.71k
    if (Val.isNull()) {
245
2.89k
      Val = NewVal;
246
2.89k
      return;
247
2.89k
    }
248
1.81k
249
1.81k
    // If we have a single value, convert to a vector.
250
1.81k
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
1.57k
      Val = new VecTy();
252
1.57k
      Val.template get<VecTy*>()->push_back(V);
253
1.57k
    }
254
1.81k
255
1.81k
    // Add the new value, we know we have a vector.
256
1.81k
    Val.template get<VecTy*>()->push_back(NewVal);
257
1.81k
  }
llvm::TinyPtrVector<llvm::Function*>::push_back(llvm::Function*)
Line
Count
Source
240
11
  void push_back(EltTy NewVal) {
241
11
    assert(NewVal && "Can't add a null value");
242
11
243
11
    // If we have nothing, add something.
244
11
    if (Val.isNull()) {
245
7
      Val = NewVal;
246
7
      return;
247
7
    }
248
4
249
4
    // If we have a single value, convert to a vector.
250
4
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
4
      Val = new VecTy();
252
4
      Val.template get<VecTy*>()->push_back(V);
253
4
    }
254
4
255
4
    // Add the new value, we know we have a vector.
256
4
    Val.template get<VecTy*>()->push_back(NewVal);
257
4
  }
llvm::TinyPtrVector<void*>::push_back(void*)
Line
Count
Source
240
12.6k
  void push_back(EltTy NewVal) {
241
12.6k
    assert(NewVal && "Can't add a null value");
242
12.6k
243
12.6k
    // If we have nothing, add something.
244
12.6k
    if (Val.isNull()) {
245
10.1k
      Val = NewVal;
246
10.1k
      return;
247
10.1k
    }
248
2.52k
249
2.52k
    // If we have a single value, convert to a vector.
250
2.52k
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
1.34k
      Val = new VecTy();
252
1.34k
      Val.template get<VecTy*>()->push_back(V);
253
1.34k
    }
254
2.52k
255
2.52k
    // Add the new value, we know we have a vector.
256
2.52k
    Val.template get<VecTy*>()->push_back(NewVal);
257
2.52k
  }
llvm::TinyPtrVector<llvm::DISubprogram const*>::push_back(llvm::DISubprogram const*)
Line
Count
Source
240
76
  void push_back(EltTy NewVal) {
241
76
    assert(NewVal && "Can't add a null value");
242
76
243
76
    // If we have nothing, add something.
244
76
    if (Val.isNull()) {
245
74
      Val = NewVal;
246
74
      return;
247
74
    }
248
2
249
2
    // If we have a single value, convert to a vector.
250
2
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
2
      Val = new VecTy();
252
2
      Val.template get<VecTy*>()->push_back(V);
253
2
    }
254
2
255
2
    // Add the new value, we know we have a vector.
256
2
    Val.template get<VecTy*>()->push_back(NewVal);
257
2
  }
llvm::TinyPtrVector<int*>::push_back(int*)
Line
Count
Source
240
997
  void push_back(EltTy NewVal) {
241
997
    assert(NewVal && "Can't add a null value");
242
997
243
997
    // If we have nothing, add something.
244
997
    if (Val.isNull()) {
245
39
      Val = NewVal;
246
39
      return;
247
39
    }
248
958
249
958
    // If we have a single value, convert to a vector.
250
958
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
17
      Val = new VecTy();
252
17
      Val.template get<VecTy*>()->push_back(V);
253
17
    }
254
958
255
958
    // Add the new value, we know we have a vector.
256
958
    Val.template get<VecTy*>()->push_back(NewVal);
257
958
  }
llvm::TinyPtrVector<clang::ObjCPropertyDecl*>::push_back(clang::ObjCPropertyDecl*)
Line
Count
Source
240
130
  void push_back(EltTy NewVal) {
241
130
    assert(NewVal && "Can't add a null value");
242
130
243
130
    // If we have nothing, add something.
244
130
    if (Val.isNull()) {
245
112
      Val = NewVal;
246
112
      return;
247
112
    }
248
18
249
18
    // If we have a single value, convert to a vector.
250
18
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
18
      Val = new VecTy();
252
18
      Val.template get<VecTy*>()->push_back(V);
253
18
    }
254
18
255
18
    // Add the new value, we know we have a vector.
256
18
    Val.template get<VecTy*>()->push_back(NewVal);
257
18
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::push_back(clang::ParsedAttr*)
Line
Count
Source
240
14.3M
  void push_back(EltTy NewVal) {
241
14.3M
    assert(NewVal && "Can't add a null value");
242
14.3M
243
14.3M
    // If we have nothing, add something.
244
14.3M
    if (Val.isNull()) {
245
6.73M
      Val = NewVal;
246
6.73M
      return;
247
6.73M
    }
248
7.66M
249
7.66M
    // If we have a single value, convert to a vector.
250
7.66M
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
4.63M
      Val = new VecTy();
252
4.63M
      Val.template get<VecTy*>()->push_back(V);
253
4.63M
    }
254
7.66M
255
7.66M
    // Add the new value, we know we have a vector.
256
7.66M
    Val.template get<VecTy*>()->push_back(NewVal);
257
7.66M
  }
llvm::TinyPtrVector<clang::VarDecl*>::push_back(clang::VarDecl*)
Line
Count
Source
240
255
  void push_back(EltTy NewVal) {
241
255
    assert(NewVal && "Can't add a null value");
242
255
243
255
    // If we have nothing, add something.
244
255
    if (Val.isNull()) {
245
171
      Val = NewVal;
246
171
      return;
247
171
    }
248
84
249
84
    // If we have a single value, convert to a vector.
250
84
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
26
      Val = new VecTy();
252
26
      Val.template get<VecTy*>()->push_back(V);
253
26
    }
254
84
255
84
    // Add the new value, we know we have a vector.
256
84
    Val.template get<VecTy*>()->push_back(NewVal);
257
84
  }
llvm::TinyPtrVector<clang::NamedDecl*>::push_back(clang::NamedDecl*)
Line
Count
Source
240
16.8k
  void push_back(EltTy NewVal) {
241
16.8k
    assert(NewVal && "Can't add a null value");
242
16.8k
243
16.8k
    // If we have nothing, add something.
244
16.8k
    if (Val.isNull()) {
245
10.2k
      Val = NewVal;
246
10.2k
      return;
247
10.2k
    }
248
6.56k
249
6.56k
    // If we have a single value, convert to a vector.
250
6.56k
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
5.30k
      Val = new VecTy();
252
5.30k
      Val.template get<VecTy*>()->push_back(V);
253
5.30k
    }
254
6.56k
255
6.56k
    // Add the new value, we know we have a vector.
256
6.56k
    Val.template get<VecTy*>()->push_back(NewVal);
257
6.56k
  }
llvm::TinyPtrVector<clang::ParmVarDecl*>::push_back(clang::ParmVarDecl*)
Line
Count
Source
240
5
  void push_back(EltTy NewVal) {
241
5
    assert(NewVal && "Can't add a null value");
242
5
243
5
    // If we have nothing, add something.
244
5
    if (Val.isNull()) {
245
3
      Val = NewVal;
246
3
      return;
247
3
    }
248
2
249
2
    // If we have a single value, convert to a vector.
250
2
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
2
      Val = new VecTy();
252
2
      Val.template get<VecTy*>()->push_back(V);
253
2
    }
254
2
255
2
    // Add the new value, we know we have a vector.
256
2
    Val.template get<VecTy*>()->push_back(NewVal);
257
2
  }
llvm::TinyPtrVector<clang::Module*>::push_back(clang::Module*)
Line
Count
Source
240
3.31k
  void push_back(EltTy NewVal) {
241
3.31k
    assert(NewVal && "Can't add a null value");
242
3.31k
243
3.31k
    // If we have nothing, add something.
244
3.31k
    if (Val.isNull()) {
245
963
      Val = NewVal;
246
963
      return;
247
963
    }
248
2.34k
249
2.34k
    // If we have a single value, convert to a vector.
250
2.34k
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
309
      Val = new VecTy();
252
309
      Val.template get<VecTy*>()->push_back(V);
253
309
    }
254
2.34k
255
2.34k
    // Add the new value, we know we have a vector.
256
2.34k
    Val.template get<VecTy*>()->push_back(NewVal);
257
2.34k
  }
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::push_back(clang::CXXMethodDecl const*)
Line
Count
Source
240
92.7k
  void push_back(EltTy NewVal) {
241
92.7k
    assert(NewVal && "Can't add a null value");
242
92.7k
243
92.7k
    // If we have nothing, add something.
244
92.7k
    if (Val.isNull()) {
245
91.9k
      Val = NewVal;
246
91.9k
      return;
247
91.9k
    }
248
760
249
760
    // If we have a single value, convert to a vector.
250
760
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
575
      Val = new VecTy();
252
575
      Val.template get<VecTy*>()->push_back(V);
253
575
    }
254
760
255
760
    // Add the new value, we know we have a vector.
256
760
    Val.template get<VecTy*>()->push_back(NewVal);
257
760
  }
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::push_back(clang::CXXRecordDecl const*)
Line
Count
Source
240
24.2k
  void push_back(EltTy NewVal) {
241
24.2k
    assert(NewVal && "Can't add a null value");
242
24.2k
243
24.2k
    // If we have nothing, add something.
244
24.2k
    if (Val.isNull()) {
245
14.1k
      Val = NewVal;
246
14.1k
      return;
247
14.1k
    }
248
10.1k
249
10.1k
    // If we have a single value, convert to a vector.
250
10.1k
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
5.46k
      Val = new VecTy();
252
5.46k
      Val.template get<VecTy*>()->push_back(V);
253
5.46k
    }
254
10.1k
255
10.1k
    // Add the new value, we know we have a vector.
256
10.1k
    Val.template get<VecTy*>()->push_back(NewVal);
257
10.1k
  }
llvm::TinyPtrVector<clang::ModuleMacro*>::push_back(clang::ModuleMacro*)
Line
Count
Source
240
15.8k
  void push_back(EltTy NewVal) {
241
15.8k
    assert(NewVal && "Can't add a null value");
242
15.8k
243
15.8k
    // If we have nothing, add something.
244
15.8k
    if (Val.isNull()) {
245
15.1k
      Val = NewVal;
246
15.1k
      return;
247
15.1k
    }
248
683
249
683
    // If we have a single value, convert to a vector.
250
683
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
467
      Val = new VecTy();
252
467
      Val.template get<VecTy*>()->push_back(V);
253
467
    }
254
683
255
683
    // Add the new value, we know we have a vector.
256
683
    Val.template get<VecTy*>()->push_back(NewVal);
257
683
  }
llvm::TinyPtrVector<llvm::AnalysisKey*>::push_back(llvm::AnalysisKey*)
Line
Count
Source
240
359
  void push_back(EltTy NewVal) {
241
359
    assert(NewVal && "Can't add a null value");
242
359
243
359
    // If we have nothing, add something.
244
359
    if (Val.isNull()) {
245
359
      Val = NewVal;
246
359
      return;
247
359
    }
248
0
249
0
    // If we have a single value, convert to a vector.
250
0
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
0
      Val = new VecTy();
252
0
      Val.template get<VecTy*>()->push_back(V);
253
0
    }
254
0
255
0
    // Add the new value, we know we have a vector.
256
0
    Val.template get<VecTy*>()->push_back(NewVal);
257
0
  }
llvm::TinyPtrVector<lld::elf::InputSection*>::push_back(lld::elf::InputSection*)
Line
Count
Source
240
203
  void push_back(EltTy NewVal) {
241
203
    assert(NewVal && "Can't add a null value");
242
203
243
203
    // If we have nothing, add something.
244
203
    if (Val.isNull()) {
245
200
      Val = NewVal;
246
200
      return;
247
200
    }
248
3
249
3
    // If we have a single value, convert to a vector.
250
3
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
251
3
      Val = new VecTy();
252
3
      Val.template get<VecTy*>()->push_back(V);
253
3
    }
254
3
255
3
    // Add the new value, we know we have a vector.
256
3
    Val.template get<VecTy*>()->push_back(NewVal);
257
3
  }
258
259
  void pop_back() {
260
    // If we have a single value, convert to empty.
261
    if (Val.template is<EltTy>())
262
      Val = (EltTy)nullptr;
263
    else if (VecTy *Vec = Val.template get<VecTy*>())
264
      Vec->pop_back();
265
  }
266
267
157M
  void clear() {
268
157M
    // If we have a single value, convert to empty.
269
157M
    if (Val.template is<EltTy>()) {
270
156M
      Val = (EltTy)nullptr;
271
156M
    } else 
if (VecTy *534k
Vec534k
= Val.template dyn_cast<VecTy*>()) {
272
534k
      // If we have a vector form, just clear it.
273
534k
      Vec->clear();
274
534k
    }
275
157M
    // Otherwise, we're already empty.
276
157M
  }
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
267
2.90M
  void clear() {
268
2.90M
    // If we have a single value, convert to empty.
269
2.90M
    if (Val.template is<EltTy>()) {
270
2.90M
      Val = (EltTy)nullptr;
271
2.90M
    } else 
if (VecTy *1
Vec1
= Val.template dyn_cast<VecTy*>()) {
272
0
      // If we have a vector form, just clear it.
273
0
      Vec->clear();
274
0
    }
275
2.90M
    // Otherwise, we're already empty.
276
2.90M
  }
llvm::TinyPtrVector<llvm::Value*>::clear()
Line
Count
Source
267
59
  void clear() {
268
59
    // If we have a single value, convert to empty.
269
59
    if (Val.template is<EltTy>()) {
270
59
      Val = (EltTy)nullptr;
271
59
    } else 
if (VecTy *0
Vec0
= Val.template dyn_cast<VecTy*>()) {
272
0
      // If we have a vector form, just clear it.
273
0
      Vec->clear();
274
0
    }
275
59
    // Otherwise, we're already empty.
276
59
  }
llvm::TinyPtrVector<llvm::Instruction*>::clear()
Line
Count
Source
267
2.89k
  void clear() {
268
2.89k
    // If we have a single value, convert to empty.
269
2.89k
    if (Val.template is<EltTy>()) {
270
1.32k
      Val = (EltTy)nullptr;
271
1.57k
    } else if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) {
272
1.57k
      // If we have a vector form, just clear it.
273
1.57k
      Vec->clear();
274
1.57k
    }
275
2.89k
    // Otherwise, we're already empty.
276
2.89k
  }
llvm::TinyPtrVector<clang::serialization::ModuleFile*>::clear()
Line
Count
Source
267
39
  void clear() {
268
39
    // If we have a single value, convert to empty.
269
39
    if (Val.template is<EltTy>()) {
270
0
      Val = (EltTy)nullptr;
271
39
    } else if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) {
272
39
      // If we have a vector form, just clear it.
273
39
      Vec->clear();
274
39
    }
275
39
    // Otherwise, we're already empty.
276
39
  }
llvm::TinyPtrVector<void*>::clear()
Line
Count
Source
267
13.1k
  void clear() {
268
13.1k
    // If we have a single value, convert to empty.
269
13.1k
    if (Val.template is<EltTy>()) {
270
11.7k
      Val = (EltTy)nullptr;
271
11.7k
    } else 
if (VecTy *1.38k
Vec1.38k
= Val.template dyn_cast<VecTy*>()) {
272
1.38k
      // If we have a vector form, just clear it.
273
1.38k
      Vec->clear();
274
1.38k
    }
275
13.1k
    // Otherwise, we're already empty.
276
13.1k
  }
llvm::TinyPtrVector<clang::ParsedAttr*>::clear()
Line
Count
Source
267
151M
  void clear() {
268
151M
    // If we have a single value, convert to empty.
269
151M
    if (Val.template is<EltTy>()) {
270
150M
      Val = (EltTy)nullptr;
271
150M
    } else 
if (VecTy *530k
Vec530k
= Val.template dyn_cast<VecTy*>()) {
272
530k
      // If we have a vector form, just clear it.
273
530k
      Vec->clear();
274
530k
    }
275
151M
    // Otherwise, we're already empty.
276
151M
  }
llvm::TinyPtrVector<clang::VarDecl*>::clear()
Line
Count
Source
267
3.18M
  void clear() {
268
3.18M
    // If we have a single value, convert to empty.
269
3.18M
    if (Val.template is<EltTy>()) {
270
3.18M
      Val = (EltTy)nullptr;
271
3.18M
    } else 
if (VecTy *743
Vec743
= Val.template dyn_cast<VecTy*>()) {
272
743
      // If we have a vector form, just clear it.
273
743
      Vec->clear();
274
743
    }
275
3.18M
    // Otherwise, we're already empty.
276
3.18M
  }
llvm::TinyPtrVector<clang::ModuleMacro*>::clear()
Line
Count
Source
267
4.44k
  void clear() {
268
4.44k
    // If we have a single value, convert to empty.
269
4.44k
    if (Val.template is<EltTy>()) {
270
4.41k
      Val = (EltTy)nullptr;
271
4.41k
    } else 
if (VecTy *23
Vec23
= Val.template dyn_cast<VecTy*>()) {
272
23
      // If we have a vector form, just clear it.
273
23
      Vec->clear();
274
23
    }
275
4.44k
    // Otherwise, we're already empty.
276
4.44k
  }
277
278
27.4k
  iterator erase(iterator I) {
279
27.4k
    assert(I >= begin() && "Iterator to erase is out of bounds.");
280
27.4k
    assert(I < end() && "Erasing at past-the-end iterator.");
281
27.4k
282
27.4k
    // If we have a single value, convert to empty.
283
27.4k
    if (Val.template is<EltTy>()) {
284
25.6k
      if (I == begin())
285
25.6k
        Val = (EltTy)nullptr;
286
25.6k
    } else 
if (VecTy *1.84k
Vec1.84k
= Val.template dyn_cast<VecTy*>()) {
287
1.84k
      // multiple items in a vector; just do the erase, there is no
288
1.84k
      // benefit to collapsing back to a pointer
289
1.84k
      return Vec->erase(I);
290
1.84k
    }
291
25.6k
    return end();
292
25.6k
  }
293
294
1.11k
  iterator erase(iterator S, iterator E) {
295
1.11k
    assert(S >= begin() && "Range to erase is out of bounds.");
296
1.11k
    assert(S <= E && "Trying to erase invalid range.");
297
1.11k
    assert(E <= end() && "Trying to erase past the end.");
298
1.11k
299
1.11k
    if (Val.template is<EltTy>()) {
300
729
      if (S == begin() && 
S != E411
)
301
411
        Val = (EltTy)nullptr;
302
729
    } else 
if (VecTy *386
Vec386
= Val.template dyn_cast<VecTy*>()) {
303
386
      return Vec->erase(S, E);
304
386
    }
305
729
    return end();
306
729
  }
llvm::TinyPtrVector<llvm::AnalysisKey*>::erase(llvm::AnalysisKey**, llvm::AnalysisKey**)
Line
Count
Source
294
280
  iterator erase(iterator S, iterator E) {
295
280
    assert(S >= begin() && "Range to erase is out of bounds.");
296
280
    assert(S <= E && "Trying to erase invalid range.");
297
280
    assert(E <= end() && "Trying to erase past the end.");
298
280
299
280
    if (Val.template is<EltTy>()) {
300
280
      if (S == begin() && 
S != E242
)
301
242
        Val = (EltTy)nullptr;
302
280
    } else 
if (VecTy *0
Vec0
= Val.template dyn_cast<VecTy*>()) {
303
0
      return Vec->erase(S, E);
304
0
    }
305
280
    return end();
306
280
  }
llvm::TinyPtrVector<llvm::BasicBlock*>::erase(llvm::BasicBlock**, llvm::BasicBlock**)
Line
Count
Source
294
25
  iterator erase(iterator S, iterator E) {
295
25
    assert(S >= begin() && "Range to erase is out of bounds.");
296
25
    assert(S <= E && "Trying to erase invalid range.");
297
25
    assert(E <= end() && "Trying to erase past the end.");
298
25
299
25
    if (Val.template is<EltTy>()) {
300
0
      if (S == begin() && S != E)
301
0
        Val = (EltTy)nullptr;
302
25
    } else if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) {
303
25
      return Vec->erase(S, E);
304
25
    }
305
0
    return end();
306
0
  }
llvm::TinyPtrVector<void*>::erase(void**, void**)
Line
Count
Source
294
39
  iterator erase(iterator S, iterator E) {
295
39
    assert(S >= begin() && "Range to erase is out of bounds.");
296
39
    assert(S <= E && "Trying to erase invalid range.");
297
39
    assert(E <= end() && "Trying to erase past the end.");
298
39
299
39
    if (Val.template is<EltTy>()) {
300
0
      if (S == begin() && S != E)
301
0
        Val = (EltTy)nullptr;
302
39
    } else if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) {
303
39
      return Vec->erase(S, E);
304
39
    }
305
0
    return end();
306
0
  }
llvm::TinyPtrVector<clang::Module*>::erase(clang::Module**, clang::Module**)
Line
Count
Source
294
566
  iterator erase(iterator S, iterator E) {
295
566
    assert(S >= begin() && "Range to erase is out of bounds.");
296
566
    assert(S <= E && "Trying to erase invalid range.");
297
566
    assert(E <= end() && "Trying to erase past the end.");
298
566
299
566
    if (Val.template is<EltTy>()) {
300
280
      if (S == begin() && 
S != E0
)
301
0
        Val = (EltTy)nullptr;
302
286
    } else if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) {
303
286
      return Vec->erase(S, E);
304
286
    }
305
280
    return end();
306
280
  }
llvm::TinyPtrVector<clang::ModuleMacro*>::erase(clang::ModuleMacro**, clang::ModuleMacro**)
Line
Count
Source
294
205
  iterator erase(iterator S, iterator E) {
295
205
    assert(S >= begin() && "Range to erase is out of bounds.");
296
205
    assert(S <= E && "Trying to erase invalid range.");
297
205
    assert(E <= end() && "Trying to erase past the end.");
298
205
299
205
    if (Val.template is<EltTy>()) {
300
169
      if (S == begin() && S != E)
301
169
        Val = (EltTy)nullptr;
302
169
    } else 
if (VecTy *36
Vec36
= Val.template dyn_cast<VecTy*>()) {
303
36
      return Vec->erase(S, E);
304
36
    }
305
169
    return end();
306
169
  }
307
308
  iterator insert(iterator I, const EltTy &Elt) {
309
    assert(I >= this->begin() && "Insertion iterator is out of bounds.");
310
    assert(I <= this->end() && "Inserting past the end of the vector.");
311
    if (I == end()) {
312
      push_back(Elt);
313
      return std::prev(end());
314
    }
315
    assert(!Val.isNull() && "Null value with non-end insert iterator.");
316
    if (EltTy V = Val.template dyn_cast<EltTy>()) {
317
      assert(I == begin());
318
      Val = Elt;
319
      push_back(V);
320
      return begin();
321
    }
322
323
    return Val.template get<VecTy*>()->insert(I, Elt);
324
  }
325
326
  template<typename ItTy>
327
72.4M
  iterator insert(iterator I, ItTy From, ItTy To) {
328
72.4M
    assert(I >= this->begin() && "Insertion iterator is out of bounds.");
329
72.4M
    assert(I <= this->end() && "Inserting past the end of the vector.");
330
72.4M
    if (From == To)
331
71.4M
      return I;
332
933k
333
933k
    // If we have a single value, convert to a vector.
334
933k
    ptrdiff_t Offset = I - begin();
335
933k
    if (Val.isNull()) {
336
903k
      if (std::next(From) == To) {
337
696k
        Val = *From;
338
696k
        return begin();
339
696k
      }
340
206k
341
206k
      Val = new VecTy();
342
206k
    } else 
if (EltTy 30.1k
V30.1k
= Val.template dyn_cast<EltTy>()) {
343
18.3k
      Val = new VecTy();
344
18.3k
      Val.template get<VecTy*>()->push_back(V);
345
18.3k
    }
346
933k
    
return Val.template get<VecTy*>()->insert(begin() + Offset, From, To)236k
;
347
933k
  }
Unexecuted instantiation: llvm::MCSymbol** llvm::TinyPtrVector<llvm::MCSymbol*>::insert<llvm::MCSymbol**>(llvm::MCSymbol**, llvm::MCSymbol**, llvm::MCSymbol**)
clang::serialization::ModuleFile** llvm::TinyPtrVector<clang::serialization::ModuleFile*>::insert<clang::serialization::ModuleFile**>(clang::serialization::ModuleFile**, clang::serialization::ModuleFile**, clang::serialization::ModuleFile**)
Line
Count
Source
327
12.6k
  iterator insert(iterator I, ItTy From, ItTy To) {
328
12.6k
    assert(I >= this->begin() && "Insertion iterator is out of bounds.");
329
12.6k
    assert(I <= this->end() && "Inserting past the end of the vector.");
330
12.6k
    if (From == To)
331
12.4k
      return I;
332
245
333
245
    // If we have a single value, convert to a vector.
334
245
    ptrdiff_t Offset = I - begin();
335
245
    if (Val.isNull()) {
336
40
      if (std::next(From) == To) {
337
0
        Val = *From;
338
0
        return begin();
339
0
      }
340
40
341
40
      Val = new VecTy();
342
205
    } else if (EltTy V = Val.template dyn_cast<EltTy>()) {
343
0
      Val = new VecTy();
344
0
      Val.template get<VecTy*>()->push_back(V);
345
0
    }
346
245
    return Val.template get<VecTy*>()->insert(begin() + Offset, From, To);
347
245
  }
clang::ParsedAttr** llvm::TinyPtrVector<clang::ParsedAttr*>::insert<clang::ParsedAttr**>(clang::ParsedAttr**, clang::ParsedAttr**, clang::ParsedAttr**)
Line
Count
Source
327
72.4M
  iterator insert(iterator I, ItTy From, ItTy To) {
328
72.4M
    assert(I >= this->begin() && "Insertion iterator is out of bounds.");
329
72.4M
    assert(I <= this->end() && "Inserting past the end of the vector.");
330
72.4M
    if (From == To)
331
71.4M
      return I;
332
933k
333
933k
    // If we have a single value, convert to a vector.
334
933k
    ptrdiff_t Offset = I - begin();
335
933k
    if (Val.isNull()) {
336
903k
      if (std::next(From) == To) {
337
696k
        Val = *From;
338
696k
        return begin();
339
696k
      }
340
206k
341
206k
      Val = new VecTy();
342
206k
    } else 
if (EltTy 29.9k
V29.9k
= Val.template dyn_cast<EltTy>()) {
343
18.3k
      Val = new VecTy();
344
18.3k
      Val.template get<VecTy*>()->push_back(V);
345
18.3k
    }
346
933k
    
return Val.template get<VecTy*>()->insert(begin() + Offset, From, To)236k
;
347
933k
  }
Unexecuted instantiation: clang::ParsedAttr** llvm::TinyPtrVector<clang::ParsedAttr*>::insert<clang::ParsedAttr* const*>(clang::ParsedAttr**, clang::ParsedAttr* const*, clang::ParsedAttr* const*)
clang::ModuleMacro** llvm::TinyPtrVector<clang::ModuleMacro*>::insert<clang::ModuleMacro* const*>(clang::ModuleMacro**, clang::ModuleMacro* const*, clang::ModuleMacro* const*)
Line
Count
Source
327
2.23k
  iterator insert(iterator I, ItTy From, ItTy To) {
328
2.23k
    assert(I >= this->begin() && "Insertion iterator is out of bounds.");
329
2.23k
    assert(I <= this->end() && "Inserting past the end of the vector.");
330
2.23k
    if (From == To)
331
2.23k
      return I;
332
0
333
0
    // If we have a single value, convert to a vector.
334
0
    ptrdiff_t Offset = I - begin();
335
0
    if (Val.isNull()) {
336
0
      if (std::next(From) == To) {
337
0
        Val = *From;
338
0
        return begin();
339
0
      }
340
0
341
0
      Val = new VecTy();
342
0
    } else if (EltTy V = Val.template dyn_cast<EltTy>()) {
343
0
      Val = new VecTy();
344
0
      Val.template get<VecTy*>()->push_back(V);
345
0
    }
346
0
    return Val.template get<VecTy*>()->insert(begin() + Offset, From, To);
347
0
  }
clang::ModuleMacro** llvm::TinyPtrVector<clang::ModuleMacro*>::insert<clang::ModuleMacro**>(clang::ModuleMacro**, clang::ModuleMacro**, clang::ModuleMacro**)
Line
Count
Source
327
1.26k
  iterator insert(iterator I, ItTy From, ItTy To) {
328
1.26k
    assert(I >= this->begin() && "Insertion iterator is out of bounds.");
329
1.26k
    assert(I <= this->end() && "Inserting past the end of the vector.");
330
1.26k
    if (From == To)
331
1.09k
      return I;
332
168
333
168
    // If we have a single value, convert to a vector.
334
168
    ptrdiff_t Offset = I - begin();
335
168
    if (Val.isNull()) {
336
168
      if (std::next(From) == To) {
337
147
        Val = *From;
338
147
        return begin();
339
147
      }
340
21
341
21
      Val = new VecTy();
342
21
    } else 
if (EltTy 0
V0
= Val.template dyn_cast<EltTy>()) {
343
0
      Val = new VecTy();
344
0
      Val.template get<VecTy*>()->push_back(V);
345
0
    }
346
168
    
return Val.template get<VecTy*>()->insert(begin() + Offset, From, To)21
;
347
168
  }
348
};
349
350
} // end namespace llvm
351
352
#endif // LLVM_ADT_TINYPTRVECTOR_H