/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 | 335M | TinyPtrVector() = default; llvm::TinyPtrVector<llvm::BasicBlock*>::TinyPtrVector() Line | Count | Source | 40 | 2.34k | TinyPtrVector() = default; |
llvm::TinyPtrVector<llvm::MCSymbol*>::TinyPtrVector() Line | Count | Source | 40 | 579 | TinyPtrVector() = default; |
llvm::TinyPtrVector<llvm::MachineInstr*>::TinyPtrVector() Line | Count | Source | 40 | 100k | TinyPtrVector() = default; |
llvm::TinyPtrVector<llvm::Metadata*>::TinyPtrVector() Line | Count | Source | 40 | 153 | TinyPtrVector() = default; |
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::TinyPtrVector() Line | Count | Source | 40 | 5.56M | TinyPtrVector() = default; |
llvm::TinyPtrVector<llvm::Value*>::TinyPtrVector() Line | Count | Source | 40 | 571 | TinyPtrVector() = default; |
llvm::TinyPtrVector<llvm::PHINode*>::TinyPtrVector() Line | Count | Source | 40 | 62 | TinyPtrVector() = default; |
llvm::TinyPtrVector<llvm::Instruction*>::TinyPtrVector() Line | Count | Source | 40 | 2.98k | TinyPtrVector() = default; |
llvm::TinyPtrVector<llvm::Function*>::TinyPtrVector() Line | Count | Source | 40 | 7 | TinyPtrVector() = default; |
llvm::TinyPtrVector<clang::ModuleMacro*>::TinyPtrVector() Line | Count | Source | 40 | 33.2k | TinyPtrVector() = default; |
llvm::TinyPtrVector<void*>::TinyPtrVector() Line | Count | Source | 40 | 10.4k | TinyPtrVector() = default; |
llvm::TinyPtrVector<clang::serialization::ModuleFile*>::TinyPtrVector() Line | Count | Source | 40 | 10.4k | TinyPtrVector() = default; |
llvm::TinyPtrVector<llvm::DISubprogram const*>::TinyPtrVector() Line | Count | Source | 40 | 139 | 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 | 329M | TinyPtrVector() = default; |
llvm::TinyPtrVector<clang::VarDecl*>::TinyPtrVector() Line | Count | Source | 40 | 465k | TinyPtrVector() = default; |
llvm::TinyPtrVector<clang::NamedDecl*>::TinyPtrVector() Line | Count | Source | 40 | 10.8k | TinyPtrVector() = default; |
llvm::TinyPtrVector<clang::ParmVarDecl*>::TinyPtrVector() Line | Count | Source | 40 | 3 | TinyPtrVector() = default; |
llvm::TinyPtrVector<clang::Module*>::TinyPtrVector() Line | Count | Source | 40 | 959 | TinyPtrVector() = default; |
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::TinyPtrVector() Line | Count | Source | 40 | 92.4k | TinyPtrVector() = default; |
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::TinyPtrVector() Line | Count | Source | 40 | 15.0k | TinyPtrVector() = default; |
llvm::TinyPtrVector<llvm::AnalysisKey*>::TinyPtrVector() Line | Count | Source | 40 | 2.43k | TinyPtrVector() = default; |
|
41 | | |
42 | 424M | ~TinyPtrVector() { |
43 | 424M | if (VecTy *V = Val.template dyn_cast<VecTy*>()) |
44 | 8.14M | delete V; |
45 | 424M | } llvm::TinyPtrVector<llvm::BasicBlock*>::~TinyPtrVector() Line | Count | Source | 42 | 2.34k | ~TinyPtrVector() { | 43 | 2.34k | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 44 | 22 | delete V; | 45 | 2.34k | } |
llvm::TinyPtrVector<llvm::AnalysisKey*>::~TinyPtrVector() Line | Count | Source | 42 | 2.43k | ~TinyPtrVector() { | 43 | 2.43k | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 44 | 0 | delete V; | 45 | 2.43k | } |
llvm::TinyPtrVector<llvm::MCSymbol*>::~TinyPtrVector() Line | Count | Source | 42 | 578 | ~TinyPtrVector() { | 43 | 578 | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 44 | 0 | delete V; | 45 | 578 | } |
llvm::TinyPtrVector<llvm::MachineInstr*>::~TinyPtrVector() Line | Count | Source | 42 | 100k | ~TinyPtrVector() { | 43 | 100k | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 44 | 15 | delete V; | 45 | 100k | } |
llvm::TinyPtrVector<llvm::Metadata*>::~TinyPtrVector() Line | Count | Source | 42 | 153 | ~TinyPtrVector() { | 43 | 153 | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 44 | 0 | delete V; | 45 | 153 | } |
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::~TinyPtrVector() Line | Count | Source | 42 | 5.56M | ~TinyPtrVector() { | 43 | 5.56M | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 44 | 2 | delete V; | 45 | 5.56M | } |
llvm::TinyPtrVector<llvm::Value*>::~TinyPtrVector() Line | Count | Source | 42 | 14.4k | ~TinyPtrVector() { | 43 | 14.4k | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 44 | 20 | delete V; | 45 | 14.4k | } |
llvm::TinyPtrVector<llvm::PHINode*>::~TinyPtrVector() Line | Count | Source | 42 | 186 | ~TinyPtrVector() { | 43 | 186 | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 44 | 0 | delete V; | 45 | 186 | } |
llvm::TinyPtrVector<llvm::Instruction*>::~TinyPtrVector() Line | Count | Source | 42 | 2.98k | ~TinyPtrVector() { | 43 | 2.98k | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 44 | 1.64k | delete V; | 45 | 2.98k | } |
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 | 58.1k | ~TinyPtrVector() { | 43 | 58.1k | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 44 | 491 | delete V; | 45 | 58.1k | } |
llvm::TinyPtrVector<clang::serialization::ModuleFile*>::~TinyPtrVector() Line | Count | Source | 42 | 11.9k | ~TinyPtrVector() { | 43 | 11.9k | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 44 | 40 | delete V; | 45 | 11.9k | } |
llvm::TinyPtrVector<void*>::~TinyPtrVector() Line | Count | Source | 42 | 11.9k | ~TinyPtrVector() { | 43 | 11.9k | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 44 | 1.36k | delete V; | 45 | 11.9k | } |
llvm::TinyPtrVector<llvm::DISubprogram const*>::~TinyPtrVector() Line | Count | Source | 42 | 457 | ~TinyPtrVector() { | 43 | 457 | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 44 | 10 | delete V; | 45 | 457 | } |
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 | 418M | ~TinyPtrVector() { | 43 | 418M | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 44 | 8.13M | delete V; | 45 | 418M | } |
llvm::TinyPtrVector<clang::VarDecl*>::~TinyPtrVector() Line | Count | Source | 42 | 465k | ~TinyPtrVector() { | 43 | 465k | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 44 | 26 | delete V; | 45 | 465k | } |
llvm::TinyPtrVector<clang::Stmt const*>::~TinyPtrVector() Line | Count | Source | 42 | 150k | ~TinyPtrVector() { | 43 | 150k | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 44 | 545 | delete V; | 45 | 150k | } |
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.8k | ~TinyPtrVector() { | 43 | 10.8k | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 44 | 5.77k | delete V; | 45 | 10.8k | } |
llvm::TinyPtrVector<clang::Module*>::~TinyPtrVector() Line | Count | Source | 42 | 1.28k | ~TinyPtrVector() { | 43 | 1.28k | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 44 | 309 | delete V; | 45 | 1.28k | } |
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::~TinyPtrVector() Line | Count | Source | 42 | 104k | ~TinyPtrVector() { | 43 | 104k | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 44 | 207 | delete V; | 45 | 104k | } |
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::~TinyPtrVector() Line | Count | Source | 42 | 15.0k | ~TinyPtrVector() { | 43 | 15.0k | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 44 | 5.98k | delete V; | 45 | 15.0k | } |
|
46 | | |
47 | 89.0M | TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) { |
48 | 89.0M | if (VecTy *V = Val.template dyn_cast<VecTy*>()) |
49 | 2.66M | Val = new VecTy(*V); |
50 | 89.0M | } 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 | 62 | TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) { | 48 | 62 | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 49 | 0 | Val = new VecTy(*V); | 50 | 62 | } |
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 | 42 | TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) { | 48 | 42 | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 49 | 2 | Val = new VecTy(*V); | 50 | 42 | } |
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 | 89.0M | TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) { | 48 | 89.0M | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 49 | 2.66M | Val = new VecTy(*V); | 50 | 89.0M | } |
llvm::TinyPtrVector<clang::VarDecl*>::TinyPtrVector(llvm::TinyPtrVector<clang::VarDecl*> const&) Line | Count | Source | 47 | 6.71k | TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) { | 48 | 6.71k | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 49 | 0 | Val = new VecTy(*V); | 50 | 6.71k | } |
llvm::TinyPtrVector<clang::Stmt const*>::TinyPtrVector(llvm::TinyPtrVector<clang::Stmt const*> const&) Line | Count | Source | 47 | 127 | TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) { | 48 | 127 | if (VecTy *V = Val.template dyn_cast<VecTy*>()) | 49 | 0 | Val = new VecTy(*V); | 50 | 127 | } |
|
51 | | |
52 | 65.8k | TinyPtrVector &operator=(const TinyPtrVector &RHS) { |
53 | 65.8k | if (this == &RHS) |
54 | 0 | return *this; |
55 | 65.8k | if (RHS.empty()) { |
56 | 64.6k | this->clear(); |
57 | 64.6k | return *this; |
58 | 64.6k | } |
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 | 14 | TinyPtrVector &operator=(const TinyPtrVector &RHS) { | 53 | 14 | if (this == &RHS) | 54 | 0 | return *this; | 55 | 14 | if (RHS.empty()) { | 56 | 0 | this->clear(); | 57 | 0 | return *this; | 58 | 0 | } | 59 | 14 | | 60 | 14 | // Try to squeeze into the single slot. If it won't fit, allocate a copied | 61 | 14 | // vector. | 62 | 14 | if (Val.template is<EltTy>()) { | 63 | 14 | if (RHS.size() == 1) | 64 | 14 | Val = RHS.front(); | 65 | 0 | else | 66 | 0 | Val = new VecTy(*RHS.Val.template get<VecTy*>()); | 67 | 14 | return *this; | 68 | 14 | } | 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.8k | TinyPtrVector &operator=(const TinyPtrVector &RHS) { | 53 | 65.8k | if (this == &RHS) | 54 | 0 | return *this; | 55 | 65.8k | if (RHS.empty()) { | 56 | 64.6k | this->clear(); | 57 | 64.6k | return *this; | 58 | 64.6k | } | 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 | } |
Unexecuted instantiation: llvm::TinyPtrVector<clang::Stmt const*>::operator=(llvm::TinyPtrVector<clang::Stmt const*> const&) |
79 | | |
80 | 230k | TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) { |
81 | 230k | RHS.Val = (EltTy)nullptr; |
82 | 230k | } 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 | 62 | TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) { | 81 | 62 | RHS.Val = (EltTy)nullptr; | 82 | 62 | } |
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::TinyPtrVector(llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>&&) Line | Count | Source | 80 | 394 | TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) { | 81 | 394 | RHS.Val = (EltTy)nullptr; | 82 | 394 | } |
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 | 278 | TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) { | 81 | 278 | RHS.Val = (EltTy)nullptr; | 82 | 278 | } |
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 | } |
llvm::TinyPtrVector<clang::Stmt const*>::TinyPtrVector(llvm::TinyPtrVector<clang::Stmt const*>&&) Line | Count | Source | 80 | 94.7k | TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) { | 81 | 94.7k | RHS.Val = (EltTy)nullptr; | 82 | 94.7k | } |
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 | 24.9k | TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) { | 81 | 24.9k | RHS.Val = (EltTy)nullptr; | 82 | 24.9k | } |
|
83 | | |
84 | 2.02M | TinyPtrVector &operator=(TinyPtrVector &&RHS) { |
85 | 2.02M | if (this == &RHS) |
86 | 0 | return *this; |
87 | 2.02M | if (RHS.empty()) { |
88 | 2.02M | this->clear(); |
89 | 2.02M | return *this; |
90 | 2.02M | } |
91 | 279 | |
92 | 279 | // If this vector has been allocated on the heap, re-use it if cheap. If it |
93 | 279 | // would require more copying, just delete it and we'll steal the other |
94 | 279 | // side. |
95 | 279 | 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 | 279 | |
105 | 279 | Val = RHS.Val; |
106 | 279 | RHS.Val = (EltTy)nullptr; |
107 | 279 | return *this; |
108 | 279 | } 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 | 2.02M | TinyPtrVector &operator=(TinyPtrVector &&RHS) { | 85 | 2.02M | if (this == &RHS) | 86 | 0 | return *this; | 87 | 2.02M | if (RHS.empty()) { | 88 | 2.02M | this->clear(); | 89 | 2.02M | return *this; | 90 | 2.02M | } | 91 | 133 | | 92 | 133 | // If this vector has been allocated on the heap, re-use it if cheap. If it | 93 | 133 | // would require more copying, just delete it and we'll steal the other | 94 | 133 | // side. | 95 | 133 | 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 | 133 | | 105 | 133 | Val = RHS.Val; | 106 | 133 | RHS.Val = (EltTy)nullptr; | 107 | 133 | return *this; | 108 | 133 | } |
llvm::TinyPtrVector<llvm::Value*>::operator=(llvm::TinyPtrVector<llvm::Value*>&&) Line | Count | Source | 84 | 211 | TinyPtrVector &operator=(TinyPtrVector &&RHS) { | 85 | 211 | if (this == &RHS) | 86 | 0 | return *this; | 87 | 211 | if (RHS.empty()) { | 88 | 65 | this->clear(); | 89 | 65 | return *this; | 90 | 65 | } | 91 | 146 | | 92 | 146 | // If this vector has been allocated on the heap, re-use it if cheap. If it | 93 | 146 | // would require more copying, just delete it and we'll steal the other | 94 | 146 | // side. | 95 | 146 | 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 | 146 | | 105 | 146 | Val = RHS.Val; | 106 | 146 | RHS.Val = (EltTy)nullptr; | 107 | 146 | return *this; | 108 | 146 | } |
llvm::TinyPtrVector<clang::ParsedAttr*>::operator=(llvm::TinyPtrVector<clang::ParsedAttr*>&&) Line | Count | Source | 84 | 148 | TinyPtrVector &operator=(TinyPtrVector &&RHS) { | 85 | 148 | if (this == &RHS) | 86 | 0 | return *this; | 87 | 148 | if (RHS.empty()) { | 88 | 148 | this->clear(); | 89 | 148 | return *this; | 90 | 148 | } | 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 | 66.1k | : 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 | 17.6k | operator ArrayRef<EltTy>() const { |
134 | 17.6k | if (Val.isNull()) |
135 | 0 | return None; |
136 | 17.6k | if (Val.template is<EltTy>()) |
137 | 17.5k | return *Val.getAddrOfPtr1(); |
138 | 182 | return *Val.template get<VecTy*>(); |
139 | 182 | } |
140 | | |
141 | | // implicit conversion operator to MutableArrayRef. |
142 | 164k | operator MutableArrayRef<EltTy>() { |
143 | 164k | if (Val.isNull()) |
144 | 157k | return None; |
145 | 7.11k | if (Val.template is<EltTy>()) |
146 | 6.62k | return *Val.getAddrOfPtr1(); |
147 | 495 | return *Val.template get<VecTy*>(); |
148 | 495 | } llvm::TinyPtrVector<llvm::MCSymbol*>::operator llvm::MutableArrayRef<llvm::MCSymbol*>() Line | Count | Source | 142 | 1.43k | operator MutableArrayRef<EltTy>() { | 143 | 1.43k | if (Val.isNull()) | 144 | 0 | return None; | 145 | 1.43k | if (Val.template is<EltTy>()) | 146 | 1.43k | 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::Module*>::operator llvm::MutableArrayRef<clang::Module*>() Line | Count | Source | 142 | 1.07k | operator MutableArrayRef<EltTy>() { | 143 | 1.07k | if (Val.isNull()) | 144 | 0 | return None; | 145 | 1.07k | if (Val.template is<EltTy>()) | 146 | 823 | return *Val.getAddrOfPtr1(); | 147 | 256 | return *Val.template get<VecTy*>(); | 148 | 256 | } |
llvm::TinyPtrVector<clang::ModuleMacro*>::operator llvm::MutableArrayRef<clang::ModuleMacro*>() Line | Count | Source | 142 | 159k | operator MutableArrayRef<EltTy>() { | 143 | 159k | if (Val.isNull()) | 144 | 157k | return None; | 145 | 2.00k | if (Val.template is<EltTy>()) | 146 | 1.77k | return *Val.getAddrOfPtr1(); | 147 | 231 | return *Val.template get<VecTy*>(); | 148 | 231 | } |
|
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 | 133M | bool empty() const { |
160 | 133M | // This vector can be empty if it contains no element, or if it |
161 | 133M | // contains a pointer to an empty vector. |
162 | 133M | if (Val.isNull()) return true118M ; |
163 | 15.6M | if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) |
164 | 10.1M | return Vec->empty(); |
165 | 5.43M | return false; |
166 | 5.43M | } llvm::TinyPtrVector<llvm::AnalysisKey*>::empty() const Line | Count | Source | 159 | 1.99k | bool empty() const { | 160 | 1.99k | // This vector can be empty if it contains no element, or if it | 161 | 1.99k | // contains a pointer to an empty vector. | 162 | 1.99k | if (Val.isNull()) return true995 ; | 163 | 1.00k | if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) | 164 | 0 | return Vec->empty(); | 165 | 1.00k | return false; | 166 | 1.00k | } |
llvm::TinyPtrVector<llvm::BasicBlock*>::empty() const Line | Count | Source | 159 | 1.14k | bool empty() const { | 160 | 1.14k | // This vector can be empty if it contains no element, or if it | 161 | 1.14k | // contains a pointer to an empty vector. | 162 | 1.14k | if (Val.isNull()) return true0 ; | 163 | 1.14k | if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) | 164 | 58 | return Vec->empty(); | 165 | 1.08k | return false; | 166 | 1.08k | } |
llvm::TinyPtrVector<llvm::MCSymbol*>::empty() const Line | Count | Source | 159 | 1.43k | bool empty() const { | 160 | 1.43k | // This vector can be empty if it contains no element, or if it | 161 | 1.43k | // contains a pointer to an empty vector. | 162 | 1.43k | if (Val.isNull()) return true579 ; | 163 | 857 | if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) | 164 | 0 | return Vec->empty(); | 165 | 857 | return false; | 166 | 857 | } |
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::empty() const Line | Count | Source | 159 | 3.14M | bool empty() const { | 160 | 3.14M | // This vector can be empty if it contains no element, or if it | 161 | 3.14M | // contains a pointer to an empty vector. | 162 | 3.14M | if (Val.isNull()) return true3.14M ; | 163 | 318 | if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) | 164 | 2 | return Vec->empty(); | 165 | 316 | return false; | 166 | 316 | } |
llvm::TinyPtrVector<llvm::Value*>::empty() const Line | Count | Source | 159 | 440 | bool empty() const { | 160 | 440 | // This vector can be empty if it contains no element, or if it | 161 | 440 | // contains a pointer to an empty vector. | 162 | 440 | if (Val.isNull()) return true139 ; | 163 | 301 | if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) | 164 | 22 | return Vec->empty(); | 165 | 279 | return false; | 166 | 279 | } |
llvm::TinyPtrVector<llvm::Instruction*>::empty() const Line | Count | Source | 159 | 7.84k | bool empty() const { | 160 | 7.84k | // This vector can be empty if it contains no element, or if it | 161 | 7.84k | // contains a pointer to an empty vector. | 162 | 7.84k | if (Val.isNull()) return true0 ; | 163 | 7.84k | if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) | 164 | 5.16k | return Vec->empty(); | 165 | 2.68k | return false; | 166 | 2.68k | } |
llvm::TinyPtrVector<clang::ParsedAttr*>::empty() const Line | Count | Source | 159 | 130M | bool empty() const { | 160 | 130M | // This vector can be empty if it contains no element, or if it | 161 | 130M | // contains a pointer to an empty vector. | 162 | 130M | if (Val.isNull()) return true115M ; | 163 | 15.4M | if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) | 164 | 10.1M | return Vec->empty(); | 165 | 5.33M | return false; | 166 | 5.33M | } |
llvm::TinyPtrVector<clang::serialization::ModuleFile*>::empty() const Line | Count | Source | 159 | 31.5k | bool empty() const { | 160 | 31.5k | // This vector can be empty if it contains no element, or if it | 161 | 31.5k | // contains a pointer to an empty vector. | 162 | 31.5k | if (Val.isNull()) return true31.2k ; | 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 | 118k | bool empty() const { | 160 | 118k | // This vector can be empty if it contains no element, or if it | 161 | 118k | // contains a pointer to an empty vector. | 162 | 118k | if (Val.isNull()) return true2.93k ; | 163 | 116k | if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) | 164 | 20.6k | return Vec->empty(); | 165 | 95.3k | return false; | 166 | 95.3k | } |
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::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 | } |
Unexecuted instantiation: llvm::TinyPtrVector<clang::Stmt const*>::empty() const |
167 | | |
168 | 17.6M | unsigned size() const { |
169 | 17.6M | if (empty()) |
170 | 9.26M | return 0; |
171 | 8.42M | if (Val.template is<EltTy>()) |
172 | 3.44M | return 1; |
173 | 4.97M | return Val.template get<VecTy*>()->size(); |
174 | 4.97M | } llvm::TinyPtrVector<llvm::BasicBlock*>::size() const Line | Count | Source | 168 | 1.13k | unsigned size() const { | 169 | 1.13k | if (empty()) | 170 | 0 | return 0; | 171 | 1.13k | if (Val.template is<EltTy>()) | 172 | 1.08k | return 1; | 173 | 58 | return Val.template get<VecTy*>()->size(); | 174 | 58 | } |
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::size() const Line | Count | Source | 168 | 14 | unsigned size() const { | 169 | 14 | if (empty()) | 170 | 0 | return 0; | 171 | 14 | if (Val.template is<EltTy>()) | 172 | 14 | return 1; | 173 | 0 | return Val.template get<VecTy*>()->size(); | 174 | 0 | } |
llvm::TinyPtrVector<llvm::Instruction*>::size() const Line | Count | Source | 168 | 2.98k | unsigned size() const { | 169 | 2.98k | if (empty()) | 170 | 0 | return 0; | 171 | 2.98k | if (Val.template is<EltTy>()) | 172 | 1.34k | return 1; | 173 | 1.64k | return Val.template get<VecTy*>()->size(); | 174 | 1.64k | } |
llvm::TinyPtrVector<clang::ParsedAttr*>::size() const Line | Count | Source | 168 | 17.6M | unsigned size() const { | 169 | 17.6M | if (empty()) | 170 | 9.26M | return 0; | 171 | 8.39M | if (Val.template is<EltTy>()) | 172 | 3.42M | return 1; | 173 | 4.97M | return Val.template get<VecTy*>()->size(); | 174 | 4.97M | } |
llvm::TinyPtrVector<void*>::size() const Line | Count | Source | 168 | 31.4k | unsigned size() const { | 169 | 31.4k | if (empty()) | 170 | 0 | return 0; | 171 | 31.4k | if (Val.template is<EltTy>()) | 172 | 25.5k | return 1; | 173 | 5.90k | return Val.template get<VecTy*>()->size(); | 174 | 5.90k | } |
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 | } |
Unexecuted instantiation: llvm::TinyPtrVector<clang::Stmt const*>::size() const |
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 | 1.00G | iterator begin() { |
182 | 1.00G | if (Val.template is<EltTy>()) |
183 | 990M | return Val.getAddrOfPtr1(); |
184 | 16.2M | |
185 | 16.2M | return Val.template get<VecTy *>()->begin(); |
186 | 16.2M | } llvm::TinyPtrVector<llvm::AnalysisKey*>::begin() Line | Count | Source | 181 | 19.0k | iterator begin() { | 182 | 19.0k | if (Val.template is<EltTy>()) | 183 | 19.0k | return Val.getAddrOfPtr1(); | 184 | 0 | | 185 | 0 | return Val.template get<VecTy *>()->begin(); | 186 | 0 | } |
llvm::TinyPtrVector<llvm::BasicBlock*>::begin() Line | Count | Source | 181 | 10.9k | iterator begin() { | 182 | 10.9k | if (Val.template is<EltTy>()) | 183 | 10.8k | 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 | 201k | iterator begin() { | 182 | 201k | if (Val.template is<EltTy>()) | 183 | 201k | return Val.getAddrOfPtr1(); | 184 | 0 | | 185 | 0 | return Val.template get<VecTy *>()->begin(); | 186 | 0 | } |
llvm::TinyPtrVector<llvm::Metadata*>::begin() Line | Count | Source | 181 | 242 | iterator begin() { | 182 | 242 | if (Val.template is<EltTy>()) | 183 | 242 | 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.73M | iterator begin() { | 182 | 4.73M | if (Val.template is<EltTy>()) | 183 | 4.73M | 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 | 186 | iterator begin() { | 182 | 186 | if (Val.template is<EltTy>()) | 183 | 186 | 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.65k | iterator begin() { | 182 | 1.65k | if (Val.template is<EltTy>()) | 183 | 0 | return Val.getAddrOfPtr1(); | 184 | 1.65k | | 185 | 1.65k | return Val.template get<VecTy *>()->begin(); | 186 | 1.65k | } |
llvm::TinyPtrVector<clang::ParsedAttr*>::begin() Line | Count | Source | 181 | 992M | iterator begin() { | 182 | 992M | if (Val.template is<EltTy>()) | 183 | 976M | return Val.getAddrOfPtr1(); | 184 | 16.2M | | 185 | 16.2M | return Val.template get<VecTy *>()->begin(); | 186 | 16.2M | } |
llvm::TinyPtrVector<clang::ModuleMacro*>::begin() Line | Count | Source | 181 | 16.5k | iterator begin() { | 182 | 16.5k | if (Val.template is<EltTy>()) | 183 | 16.0k | return Val.getAddrOfPtr1(); | 184 | 558 | | 185 | 558 | return Val.template get<VecTy *>()->begin(); | 186 | 558 | } |
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.8k | iterator begin() { | 182 | 12.8k | if (Val.template is<EltTy>()) | 183 | 12.3k | return Val.getAddrOfPtr1(); | 184 | 489 | | 185 | 489 | return Val.template get<VecTy *>()->begin(); | 186 | 489 | } |
llvm::TinyPtrVector<void*>::begin() Line | Count | Source | 181 | 164k | iterator begin() { | 182 | 164k | if (Val.template is<EltTy>()) | 183 | 142k | return Val.getAddrOfPtr1(); | 184 | 22.1k | | 185 | 22.1k | return Val.template get<VecTy *>()->begin(); | 186 | 22.1k | } |
llvm::TinyPtrVector<llvm::DISubprogram const*>::begin() Line | Count | Source | 181 | 268 | iterator begin() { | 182 | 268 | if (Val.template is<EltTy>()) | 183 | 260 | return Val.getAddrOfPtr1(); | 184 | 8 | | 185 | 8 | return Val.template get<VecTy *>()->begin(); | 186 | 8 | } |
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::Stmt const*>::begin() Line | Count | Source | 181 | 37.4k | iterator begin() { | 182 | 37.4k | if (Val.template is<EltTy>()) | 183 | 37.1k | return Val.getAddrOfPtr1(); | 184 | 328 | | 185 | 328 | return Val.template get<VecTy *>()->begin(); | 186 | 328 | } |
llvm::TinyPtrVector<clang::VarDecl*>::begin() Line | Count | Source | 181 | 7.88M | iterator begin() { | 182 | 7.88M | if (Val.template is<EltTy>()) | 183 | 7.88M | return Val.getAddrOfPtr1(); | 184 | 154 | | 185 | 154 | return Val.template get<VecTy *>()->begin(); | 186 | 154 | } |
llvm::TinyPtrVector<clang::NamedDecl*>::begin() Line | Count | Source | 181 | 13.3k | iterator begin() { | 182 | 13.3k | if (Val.template is<EltTy>()) | 183 | 11.8k | return Val.getAddrOfPtr1(); | 184 | 1.49k | | 185 | 1.49k | return Val.template get<VecTy *>()->begin(); | 186 | 1.49k | } |
llvm::TinyPtrVector<clang::Module*>::begin() Line | Count | Source | 181 | 2.49k | iterator begin() { | 182 | 2.49k | if (Val.template is<EltTy>()) | 183 | 1.91k | 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.10M | iterator begin() { | 182 | 1.10M | if (Val.template is<EltTy>()) | 183 | 1.09M | return Val.getAddrOfPtr1(); | 184 | 6.71k | | 185 | 6.71k | return Val.template get<VecTy *>()->begin(); | 186 | 6.71k | } |
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::begin() Line | Count | Source | 181 | 74.5k | iterator begin() { | 182 | 74.5k | if (Val.template is<EltTy>()) | 183 | 69.2k | return Val.getAddrOfPtr1(); | 184 | 5.27k | | 185 | 5.27k | return Val.template get<VecTy *>()->begin(); | 186 | 5.27k | } |
|
187 | | |
188 | 511M | iterator end() { |
189 | 511M | if (Val.template is<EltTy>()) |
190 | 494M | return begin() + (Val.isNull() ? 0487M : 16.94M ); |
191 | 16.5M | |
192 | 16.5M | return Val.template get<VecTy *>()->end(); |
193 | 16.5M | } llvm::TinyPtrVector<llvm::AnalysisKey*>::end() Line | Count | Source | 188 | 11.7k | iterator end() { | 189 | 11.7k | if (Val.template is<EltTy>()) | 190 | 11.7k | return begin() + (Val.isNull() ? 05.86k : 15.88k ); | 191 | 0 | | 192 | 0 | return Val.template get<VecTy *>()->end(); | 193 | 0 | } |
llvm::TinyPtrVector<llvm::BasicBlock*>::end() Line | Count | Source | 188 | 6.97k | iterator end() { | 189 | 6.97k | if (Val.template is<EltTy>()) | 190 | 6.88k | return begin() + (Val.isNull() ? 04.62k : 12.25k ); | 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 | 100k | iterator end() { | 189 | 100k | if (Val.template is<EltTy>()) | 190 | 100k | return begin() + (Val.isNull() ? 0100k : 12 ); | 191 | 0 | | 192 | 0 | return Val.template get<VecTy *>()->end(); | 193 | 0 | } |
llvm::TinyPtrVector<llvm::Metadata*>::end() Line | Count | Source | 188 | 121 | iterator end() { | 189 | 121 | if (Val.template is<EltTy>()) | 190 | 121 | return begin() + (Val.isNull() ? 030 : 191 ); | 191 | 0 | | 192 | 0 | return Val.template get<VecTy *>()->end(); | 193 | 0 | } |
llvm::TinyPtrVector<llvm::DbgVariableIntrinsic*>::end() Line | Count | Source | 188 | 2.36M | iterator end() { | 189 | 2.36M | if (Val.template is<EltTy>()) | 190 | 2.36M | return begin() + (Val.isNull() ? 02.36M : 1263 ); | 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 | 124 | iterator end() { | 189 | 124 | if (Val.template is<EltTy>()) | 190 | 124 | 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.65k | iterator end() { | 189 | 1.65k | if (Val.template is<EltTy>()) | 190 | 0 | return begin() + (Val.isNull() ? 0 : 1); | 191 | 1.65k | | 192 | 1.65k | return Val.template get<VecTy *>()->end(); | 193 | 1.65k | } |
llvm::TinyPtrVector<clang::ParsedAttr*>::end() Line | Count | Source | 188 | 503M | iterator end() { | 189 | 503M | if (Val.template is<EltTy>()) | 190 | 487M | return begin() + (Val.isNull() ? 0481M : 16.30M ); | 191 | 16.5M | | 192 | 16.5M | return Val.template get<VecTy *>()->end(); | 193 | 16.5M | } |
llvm::TinyPtrVector<clang::ModuleMacro*>::end() Line | Count | Source | 188 | 10.7k | iterator end() { | 189 | 10.7k | if (Val.template is<EltTy>()) | 190 | 10.1k | return begin() + (Val.isNull() ? 07.47k : 12.71k ); | 191 | 573 | | 192 | 573 | return Val.template get<VecTy *>()->end(); | 193 | 573 | } |
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 | 13.0k | iterator end() { | 189 | 13.0k | if (Val.template is<EltTy>()) | 190 | 12.3k | 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 | 43.6k | iterator end() { | 189 | 43.6k | if (Val.template is<EltTy>()) | 190 | 36.1k | return begin() + (Val.isNull() ? 01.46k : 134.7k ); | 191 | 7.42k | | 192 | 7.42k | return Val.template get<VecTy *>()->end(); | 193 | 7.42k | } |
llvm::TinyPtrVector<llvm::DISubprogram const*>::end() Line | Count | Source | 188 | 138 | iterator end() { | 189 | 138 | if (Val.template is<EltTy>()) | 190 | 130 | return begin() + (Val.isNull() ? 00 : 1); | 191 | 8 | | 192 | 8 | return Val.template get<VecTy *>()->end(); | 193 | 8 | } |
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::Stmt const*>::end() Line | Count | Source | 188 | 18.8k | iterator end() { | 189 | 18.8k | if (Val.template is<EltTy>()) | 190 | 18.5k | return begin() + (Val.isNull() ? 00 : 1); | 191 | 328 | | 192 | 328 | return Val.template get<VecTy *>()->end(); | 193 | 328 | } |
llvm::TinyPtrVector<clang::VarDecl*>::end() Line | Count | Source | 188 | 3.94M | iterator end() { | 189 | 3.94M | if (Val.template is<EltTy>()) | 190 | 3.94M | return begin() + (Val.isNull() ? 03.94M : 1145 ); | 191 | 155 | | 192 | 155 | return Val.template get<VecTy *>()->end(); | 193 | 155 | } |
llvm::TinyPtrVector<clang::NamedDecl*>::end() Line | Count | Source | 188 | 7.41k | iterator end() { | 189 | 7.41k | if (Val.template is<EltTy>()) | 190 | 5.92k | return begin() + (Val.isNull() ? 00 : 1); | 191 | 1.49k | | 192 | 1.49k | return Val.template get<VecTy *>()->end(); | 193 | 1.49k | } |
llvm::TinyPtrVector<clang::Module*>::end() Line | Count | Source | 188 | 1.95k | iterator end() { | 189 | 1.95k | if (Val.template is<EltTy>()) | 190 | 1.09k | 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 | 553k | iterator end() { | 189 | 553k | if (Val.template is<EltTy>()) | 190 | 547k | return begin() + (Val.isNull() ? 00 : 1); | 191 | 6.71k | | 192 | 6.71k | return Val.template get<VecTy *>()->end(); | 193 | 6.71k | } |
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::end() Line | Count | Source | 188 | 56.7k | iterator end() { | 189 | 56.7k | if (Val.template is<EltTy>()) | 190 | 46.1k | return begin() + (Val.isNull() ? 030.1k : 115.9k ); | 191 | 10.5k | | 192 | 10.5k | return Val.template get<VecTy *>()->end(); | 193 | 10.5k | } |
|
194 | | |
195 | 123M | const_iterator begin() const { |
196 | 123M | return (const_iterator)const_cast<TinyPtrVector*>(this)->begin(); |
197 | 123M | } llvm::TinyPtrVector<llvm::AnalysisKey*>::begin() const Line | Count | Source | 195 | 878 | const_iterator begin() const { | 196 | 878 | return (const_iterator)const_cast<TinyPtrVector*>(this)->begin(); | 197 | 878 | } |
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<clang::ParsedAttr*>::begin() const Line | Count | Source | 195 | 118M | const_iterator begin() const { | 196 | 118M | return (const_iterator)const_cast<TinyPtrVector*>(this)->begin(); | 197 | 118M | } |
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 | 84.5k | const_iterator begin() const { | 196 | 84.5k | return (const_iterator)const_cast<TinyPtrVector*>(this)->begin(); | 197 | 84.5k | } |
llvm::TinyPtrVector<clang::Stmt const*>::begin() const Line | Count | Source | 195 | 18.8k | const_iterator begin() const { | 196 | 18.8k | return (const_iterator)const_cast<TinyPtrVector*>(this)->begin(); | 197 | 18.8k | } |
llvm::TinyPtrVector<clang::VarDecl*>::begin() const Line | Count | Source | 195 | 3.94M | const_iterator begin() const { | 196 | 3.94M | return (const_iterator)const_cast<TinyPtrVector*>(this)->begin(); | 197 | 3.94M | } |
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::begin() const Line | Count | Source | 195 | 553k | const_iterator begin() const { | 196 | 553k | return (const_iterator)const_cast<TinyPtrVector*>(this)->begin(); | 197 | 553k | } |
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::begin() const Line | Count | Source | 195 | 2.39k | const_iterator begin() const { | 196 | 2.39k | return (const_iterator)const_cast<TinyPtrVector*>(this)->begin(); | 197 | 2.39k | } |
|
198 | | |
199 | 126M | const_iterator end() const { |
200 | 126M | return (const_iterator)const_cast<TinyPtrVector*>(this)->end(); |
201 | 126M | } llvm::TinyPtrVector<llvm::AnalysisKey*>::end() const Line | Count | Source | 199 | 878 | const_iterator end() const { | 200 | 878 | return (const_iterator)const_cast<TinyPtrVector*>(this)->end(); | 201 | 878 | } |
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<clang::ParsedAttr*>::end() const Line | Count | Source | 199 | 122M | const_iterator end() const { | 200 | 122M | return (const_iterator)const_cast<TinyPtrVector*>(this)->end(); | 201 | 122M | } |
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::Stmt const*>::end() const Line | Count | Source | 199 | 18.8k | const_iterator end() const { | 200 | 18.8k | return (const_iterator)const_cast<TinyPtrVector*>(this)->end(); | 201 | 18.8k | } |
llvm::TinyPtrVector<clang::VarDecl*>::end() const Line | Count | Source | 199 | 3.94M | const_iterator end() const { | 200 | 3.94M | return (const_iterator)const_cast<TinyPtrVector*>(this)->end(); | 201 | 3.94M | } |
llvm::TinyPtrVector<clang::CXXMethodDecl const*>::end() const Line | Count | Source | 199 | 553k | const_iterator end() const { | 200 | 553k | return (const_iterator)const_cast<TinyPtrVector*>(this)->end(); | 201 | 553k | } |
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::end() const Line | Count | Source | 199 | 4.78k | const_iterator end() const { | 200 | 4.78k | return (const_iterator)const_cast<TinyPtrVector*>(this)->end(); | 201 | 4.78k | } |
|
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 | 4.45M | EltTy operator[](unsigned i) const { |
215 | 4.45M | assert(!Val.isNull() && "can't index into an empty vector"); |
216 | 4.45M | if (EltTy V = Val.template dyn_cast<EltTy>()) { |
217 | 953k | assert(i == 0 && "tinyvector index out of range"); |
218 | 953k | return V; |
219 | 953k | } |
220 | 3.50M | |
221 | 3.50M | assert(i < Val.template get<VecTy*>()->size() && |
222 | 3.50M | "tinyvector index out of range"); |
223 | 3.50M | return (*Val.template get<VecTy*>())[i]; |
224 | 3.50M | } llvm::TinyPtrVector<clang::ParsedAttr*>::operator[](unsigned int) const Line | Count | Source | 214 | 4.45M | EltTy operator[](unsigned i) const { | 215 | 4.45M | assert(!Val.isNull() && "can't index into an empty vector"); | 216 | 4.45M | if (EltTy V = Val.template dyn_cast<EltTy>()) { | 217 | 953k | assert(i == 0 && "tinyvector index out of range"); | 218 | 953k | return V; | 219 | 953k | } | 220 | 3.50M | | 221 | 3.50M | assert(i < Val.template get<VecTy*>()->size() && | 222 | 3.50M | "tinyvector index out of range"); | 223 | 3.50M | return (*Val.template get<VecTy*>())[i]; | 224 | 3.50M | } |
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.13k | EltTy front() const { |
227 | 2.13k | assert(!empty() && "vector empty"); |
228 | 2.13k | if (EltTy V = Val.template dyn_cast<EltTy>()) |
229 | 2.10k | return V; |
230 | 29 | return Val.template get<VecTy*>()->front(); |
231 | 29 | } llvm::TinyPtrVector<llvm::BasicBlock*>::front() const Line | Count | Source | 226 | 693 | EltTy front() const { | 227 | 693 | assert(!empty() && "vector empty"); | 228 | 693 | if (EltTy V = Val.template dyn_cast<EltTy>()) | 229 | 691 | 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 | 201 | EltTy front() const { | 227 | 201 | assert(!empty() && "vector empty"); | 228 | 201 | if (EltTy V = Val.template dyn_cast<EltTy>()) | 229 | 201 | return V; | 230 | 0 | return Val.template get<VecTy*>()->front(); | 231 | 0 | } |
Unexecuted instantiation: llvm::TinyPtrVector<llvm::Value*>::front() const 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 | } |
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 | } |
Unexecuted instantiation: llvm::TinyPtrVector<clang::Stmt const*>::front() const |
232 | | |
233 | 37 | EltTy back() const { |
234 | 37 | assert(!empty() && "vector empty"); |
235 | 37 | if (EltTy V = Val.template dyn_cast<EltTy>()) |
236 | 36 | return V; |
237 | 1 | return Val.template get<VecTy*>()->back(); |
238 | 1 | } |
239 | | |
240 | 16.5M | void push_back(EltTy NewVal) { |
241 | 16.5M | assert(NewVal && "Can't add a null value"); |
242 | 16.5M | |
243 | 16.5M | // If we have nothing, add something. |
244 | 16.5M | if (Val.isNull()) { |
245 | 7.86M | Val = NewVal; |
246 | 7.86M | return; |
247 | 7.86M | } |
248 | 8.64M | |
249 | 8.64M | // If we have a single value, convert to a vector. |
250 | 8.64M | if (EltTy V = Val.template dyn_cast<EltTy>()) { |
251 | 5.23M | Val = new VecTy(); |
252 | 5.23M | Val.template get<VecTy*>()->push_back(V); |
253 | 5.23M | } |
254 | 8.64M | |
255 | 8.64M | // Add the new value, we know we have a vector. |
256 | 8.64M | Val.template get<VecTy*>()->push_back(NewVal); |
257 | 8.64M | } llvm::TinyPtrVector<llvm::BasicBlock*>::push_back(llvm::BasicBlock*) Line | Count | Source | 240 | 2.36k | void push_back(EltTy NewVal) { | 241 | 2.36k | assert(NewVal && "Can't add a null value"); | 242 | 2.36k | | 243 | 2.36k | // If we have nothing, add something. | 244 | 2.36k | if (Val.isNull()) { | 245 | 2.33k | Val = NewVal; | 246 | 2.33k | return; | 247 | 2.33k | } | 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 | 579 | void push_back(EltTy NewVal) { | 241 | 579 | assert(NewVal && "Can't add a null value"); | 242 | 579 | | 243 | 579 | // If we have nothing, add something. | 244 | 579 | if (Val.isNull()) { | 245 | 579 | Val = NewVal; | 246 | 579 | return; | 247 | 579 | } | 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 | 87 | void push_back(EltTy NewVal) { | 241 | 87 | assert(NewVal && "Can't add a null value"); | 242 | 87 | | 243 | 87 | // If we have nothing, add something. | 244 | 87 | if (Val.isNull()) { | 245 | 66 | Val = NewVal; | 246 | 66 | return; | 247 | 66 | } | 248 | 21 | | 249 | 21 | // If we have a single value, convert to a vector. | 250 | 21 | 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 | 21 | | 255 | 21 | // Add the new value, we know we have a vector. | 256 | 21 | Val.template get<VecTy*>()->push_back(NewVal); | 257 | 21 | } |
llvm::TinyPtrVector<llvm::Metadata*>::push_back(llvm::Metadata*) Line | Count | Source | 240 | 127 | void push_back(EltTy NewVal) { | 241 | 127 | assert(NewVal && "Can't add a null value"); | 242 | 127 | | 243 | 127 | // If we have nothing, add something. | 244 | 127 | if (Val.isNull()) { | 245 | 127 | Val = NewVal; | 246 | 127 | return; | 247 | 127 | } | 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 | 304 | void push_back(EltTy NewVal) { | 241 | 304 | assert(NewVal && "Can't add a null value"); | 242 | 304 | | 243 | 304 | // If we have nothing, add something. | 244 | 304 | if (Val.isNull()) { | 245 | 286 | Val = NewVal; | 246 | 286 | return; | 247 | 286 | } | 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 | 62 | void push_back(EltTy NewVal) { | 241 | 62 | assert(NewVal && "Can't add a null value"); | 242 | 62 | | 243 | 62 | // If we have nothing, add something. | 244 | 62 | if (Val.isNull()) { | 245 | 62 | Val = NewVal; | 246 | 62 | return; | 247 | 62 | } | 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 | 297 | void push_back(EltTy NewVal) { | 241 | 297 | assert(NewVal && "Can't add a null value"); | 242 | 297 | | 243 | 297 | // If we have nothing, add something. | 244 | 297 | if (Val.isNull()) { | 245 | 295 | Val = NewVal; | 246 | 295 | return; | 247 | 295 | } | 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.86k | void push_back(EltTy NewVal) { | 241 | 4.86k | assert(NewVal && "Can't add a null value"); | 242 | 4.86k | | 243 | 4.86k | // If we have nothing, add something. | 244 | 4.86k | if (Val.isNull()) { | 245 | 2.98k | Val = NewVal; | 246 | 2.98k | return; | 247 | 2.98k | } | 248 | 1.88k | | 249 | 1.88k | // If we have a single value, convert to a vector. | 250 | 1.88k | if (EltTy V = Val.template dyn_cast<EltTy>()) { | 251 | 1.64k | Val = new VecTy(); | 252 | 1.64k | Val.template get<VecTy*>()->push_back(V); | 253 | 1.64k | } | 254 | 1.88k | | 255 | 1.88k | // Add the new value, we know we have a vector. | 256 | 1.88k | Val.template get<VecTy*>()->push_back(NewVal); | 257 | 1.88k | } |
llvm::TinyPtrVector<clang::ParsedAttr*>::push_back(clang::ParsedAttr*) Line | Count | Source | 240 | 16.3M | void push_back(EltTy NewVal) { | 241 | 16.3M | assert(NewVal && "Can't add a null value"); | 242 | 16.3M | | 243 | 16.3M | // If we have nothing, add something. | 244 | 16.3M | if (Val.isNull()) { | 245 | 7.70M | Val = NewVal; | 246 | 7.70M | return; | 247 | 7.70M | } | 248 | 8.61M | | 249 | 8.61M | // If we have a single value, convert to a vector. | 250 | 8.61M | if (EltTy V = Val.template dyn_cast<EltTy>()) { | 251 | 5.22M | Val = new VecTy(); | 252 | 5.22M | Val.template get<VecTy*>()->push_back(V); | 253 | 5.22M | } | 254 | 8.61M | | 255 | 8.61M | // Add the new value, we know we have a vector. | 256 | 8.61M | Val.template get<VecTy*>()->push_back(NewVal); | 257 | 8.61M | } |
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 | 13.0k | void push_back(EltTy NewVal) { | 241 | 13.0k | assert(NewVal && "Can't add a null value"); | 242 | 13.0k | | 243 | 13.0k | // If we have nothing, add something. | 244 | 13.0k | if (Val.isNull()) { | 245 | 10.4k | Val = NewVal; | 246 | 10.4k | return; | 247 | 10.4k | } | 248 | 2.55k | | 249 | 2.55k | // If we have a single value, convert to a vector. | 250 | 2.55k | if (EltTy V = Val.template dyn_cast<EltTy>()) { | 251 | 1.36k | Val = new VecTy(); | 252 | 1.36k | Val.template get<VecTy*>()->push_back(V); | 253 | 1.36k | } | 254 | 2.55k | | 255 | 2.55k | // Add the new value, we know we have a vector. | 256 | 2.55k | Val.template get<VecTy*>()->push_back(NewVal); | 257 | 2.55k | } |
llvm::TinyPtrVector<llvm::DISubprogram const*>::push_back(llvm::DISubprogram const*) Line | Count | Source | 240 | 147 | void push_back(EltTy NewVal) { | 241 | 147 | assert(NewVal && "Can't add a null value"); | 242 | 147 | | 243 | 147 | // If we have nothing, add something. | 244 | 147 | if (Val.isNull()) { | 245 | 139 | Val = NewVal; | 246 | 139 | return; | 247 | 139 | } | 248 | 8 | | 249 | 8 | // If we have a single value, convert to a vector. | 250 | 8 | if (EltTy V = Val.template dyn_cast<EltTy>()) { | 251 | 8 | Val = new VecTy(); | 252 | 8 | Val.template get<VecTy*>()->push_back(V); | 253 | 8 | } | 254 | 8 | | 255 | 8 | // Add the new value, we know we have a vector. | 256 | 8 | Val.template get<VecTy*>()->push_back(NewVal); | 257 | 8 | } |
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::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 | 17.9k | void push_back(EltTy NewVal) { | 241 | 17.9k | assert(NewVal && "Can't add a null value"); | 242 | 17.9k | | 243 | 17.9k | // If we have nothing, add something. | 244 | 17.9k | if (Val.isNull()) { | 245 | 10.8k | Val = NewVal; | 246 | 10.8k | return; | 247 | 10.8k | } | 248 | 7.11k | | 249 | 7.11k | // If we have a single value, convert to a vector. | 250 | 7.11k | if (EltTy V = Val.template dyn_cast<EltTy>()) { | 251 | 5.77k | Val = new VecTy(); | 252 | 5.77k | Val.template get<VecTy*>()->push_back(V); | 253 | 5.77k | } | 254 | 7.11k | | 255 | 7.11k | // Add the new value, we know we have a vector. | 256 | 7.11k | Val.template get<VecTy*>()->push_back(NewVal); | 257 | 7.11k | } |
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.30k | void push_back(EltTy NewVal) { | 241 | 3.30k | assert(NewVal && "Can't add a null value"); | 242 | 3.30k | | 243 | 3.30k | // If we have nothing, add something. | 244 | 3.30k | if (Val.isNull()) { | 245 | 959 | Val = NewVal; | 246 | 959 | return; | 247 | 959 | } | 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 | 93.2k | void push_back(EltTy NewVal) { | 241 | 93.2k | assert(NewVal && "Can't add a null value"); | 242 | 93.2k | | 243 | 93.2k | // If we have nothing, add something. | 244 | 93.2k | if (Val.isNull()) { | 245 | 92.4k | Val = NewVal; | 246 | 92.4k | return; | 247 | 92.4k | } | 248 | 768 | | 249 | 768 | // If we have a single value, convert to a vector. | 250 | 768 | if (EltTy V = Val.template dyn_cast<EltTy>()) { | 251 | 583 | Val = new VecTy(); | 252 | 583 | Val.template get<VecTy*>()->push_back(V); | 253 | 583 | } | 254 | 768 | | 255 | 768 | // Add the new value, we know we have a vector. | 256 | 768 | Val.template get<VecTy*>()->push_back(NewVal); | 257 | 768 | } |
llvm::TinyPtrVector<clang::CXXRecordDecl const*>::push_back(clang::CXXRecordDecl const*) Line | Count | Source | 240 | 25.9k | void push_back(EltTy NewVal) { | 241 | 25.9k | assert(NewVal && "Can't add a null value"); | 242 | 25.9k | | 243 | 25.9k | // If we have nothing, add something. | 244 | 25.9k | if (Val.isNull()) { | 245 | 15.0k | Val = NewVal; | 246 | 15.0k | return; | 247 | 15.0k | } | 248 | 10.8k | | 249 | 10.8k | // If we have a single value, convert to a vector. | 250 | 10.8k | if (EltTy V = Val.template dyn_cast<EltTy>()) { | 251 | 5.98k | Val = new VecTy(); | 252 | 5.98k | Val.template get<VecTy*>()->push_back(V); | 253 | 5.98k | } | 254 | 10.8k | | 255 | 10.8k | // Add the new value, we know we have a vector. | 256 | 10.8k | Val.template get<VecTy*>()->push_back(NewVal); | 257 | 10.8k | } |
llvm::TinyPtrVector<clang::ModuleMacro*>::push_back(clang::ModuleMacro*) Line | Count | Source | 240 | 19.7k | void push_back(EltTy NewVal) { | 241 | 19.7k | assert(NewVal && "Can't add a null value"); | 242 | 19.7k | | 243 | 19.7k | // If we have nothing, add something. | 244 | 19.7k | if (Val.isNull()) { | 245 | 19.0k | Val = NewVal; | 246 | 19.0k | return; | 247 | 19.0k | } | 248 | 687 | | 249 | 687 | // If we have a single value, convert to a vector. | 250 | 687 | if (EltTy V = Val.template dyn_cast<EltTy>()) { | 251 | 471 | Val = new VecTy(); | 252 | 471 | Val.template get<VecTy*>()->push_back(V); | 253 | 471 | } | 254 | 687 | | 255 | 687 | // Add the new value, we know we have a vector. | 256 | 687 | Val.template get<VecTy*>()->push_back(NewVal); | 257 | 687 | } |
llvm::TinyPtrVector<llvm::AnalysisKey*>::push_back(llvm::AnalysisKey*) Line | Count | Source | 240 | 2.43k | void push_back(EltTy NewVal) { | 241 | 2.43k | assert(NewVal && "Can't add a null value"); | 242 | 2.43k | | 243 | 2.43k | // If we have nothing, add something. | 244 | 2.43k | if (Val.isNull()) { | 245 | 2.43k | Val = NewVal; | 246 | 2.43k | return; | 247 | 2.43k | } | 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 | } |
|
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 | 168M | void clear() { |
268 | 168M | // If we have a single value, convert to empty. |
269 | 168M | if (Val.template is<EltTy>()) { |
270 | 167M | Val = (EltTy)nullptr; |
271 | 167M | } else if (VecTy *578k Vec578k = Val.template dyn_cast<VecTy*>()) { |
272 | 578k | // If we have a vector form, just clear it. |
273 | 578k | Vec->clear(); |
274 | 578k | } |
275 | 168M | // Otherwise, we're already empty. |
276 | 168M | } 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.97M | void clear() { | 268 | 2.97M | // If we have a single value, convert to empty. | 269 | 2.97M | if (Val.template is<EltTy>()) { | 270 | 2.97M | Val = (EltTy)nullptr; | 271 | 2.97M | } 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 | 2.97M | // Otherwise, we're already empty. | 276 | 2.97M | } |
llvm::TinyPtrVector<llvm::Value*>::clear() Line | Count | Source | 267 | 65 | void clear() { | 268 | 65 | // If we have a single value, convert to empty. | 269 | 65 | if (Val.template is<EltTy>()) { | 270 | 65 | Val = (EltTy)nullptr; | 271 | 65 | } 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 | 65 | // Otherwise, we're already empty. | 276 | 65 | } |
llvm::TinyPtrVector<llvm::Instruction*>::clear() Line | Count | Source | 267 | 2.98k | void clear() { | 268 | 2.98k | // If we have a single value, convert to empty. | 269 | 2.98k | if (Val.template is<EltTy>()) { | 270 | 1.34k | Val = (EltTy)nullptr; | 271 | 1.64k | } else if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) { | 272 | 1.64k | // If we have a vector form, just clear it. | 273 | 1.64k | Vec->clear(); | 274 | 1.64k | } | 275 | 2.98k | // Otherwise, we're already empty. | 276 | 2.98k | } |
llvm::TinyPtrVector<clang::ParsedAttr*>::clear() Line | Count | Source | 267 | 161M | void clear() { | 268 | 161M | // If we have a single value, convert to empty. | 269 | 161M | if (Val.template is<EltTy>()) { | 270 | 160M | Val = (EltTy)nullptr; | 271 | 160M | } else if (VecTy *575k Vec575k = Val.template dyn_cast<VecTy*>()) { | 272 | 575k | // If we have a vector form, just clear it. | 273 | 575k | Vec->clear(); | 274 | 575k | } | 275 | 161M | // Otherwise, we're already empty. | 276 | 161M | } |
llvm::TinyPtrVector<clang::ModuleMacro*>::clear() Line | Count | Source | 267 | 5.53k | void clear() { | 268 | 5.53k | // If we have a single value, convert to empty. | 269 | 5.53k | if (Val.template is<EltTy>()) { | 270 | 5.51k | Val = (EltTy)nullptr; | 271 | 5.51k | } 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 | 5.53k | // Otherwise, we're already empty. | 276 | 5.53k | } |
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.4k | void clear() { | 268 | 13.4k | // If we have a single value, convert to empty. | 269 | 13.4k | if (Val.template is<EltTy>()) { | 270 | 12.0k | Val = (EltTy)nullptr; | 271 | 12.0k | } else if (VecTy *1.40k Vec1.40k = Val.template dyn_cast<VecTy*>()) { | 272 | 1.40k | // If we have a vector form, just clear it. | 273 | 1.40k | Vec->clear(); | 274 | 1.40k | } | 275 | 13.4k | // Otherwise, we're already empty. | 276 | 13.4k | } |
llvm::TinyPtrVector<clang::VarDecl*>::clear() Line | Count | Source | 267 | 3.47M | void clear() { | 268 | 3.47M | // If we have a single value, convert to empty. | 269 | 3.47M | if (Val.template is<EltTy>()) { | 270 | 3.47M | Val = (EltTy)nullptr; | 271 | 3.47M | } else if (VecTy *129 Vec129 = Val.template dyn_cast<VecTy*>()) { | 272 | 129 | // If we have a vector form, just clear it. | 273 | 129 | Vec->clear(); | 274 | 129 | } | 275 | 3.47M | // Otherwise, we're already empty. | 276 | 3.47M | } |
Unexecuted instantiation: llvm::TinyPtrVector<clang::Stmt const*>::clear() |
277 | | |
278 | 29.2k | iterator erase(iterator I) { |
279 | 29.2k | assert(I >= begin() && "Iterator to erase is out of bounds."); |
280 | 29.2k | assert(I < end() && "Erasing at past-the-end iterator."); |
281 | 29.2k | |
282 | 29.2k | // If we have a single value, convert to empty. |
283 | 29.2k | if (Val.template is<EltTy>()) { |
284 | 26.0k | if (I == begin()) |
285 | 26.0k | Val = (EltTy)nullptr; |
286 | 26.0k | } else if (VecTy *3.19k Vec3.19k = Val.template dyn_cast<VecTy*>()) { |
287 | 3.19k | // multiple items in a vector; just do the erase, there is no |
288 | 3.19k | // benefit to collapsing back to a pointer |
289 | 3.19k | return Vec->erase(I); |
290 | 3.19k | } |
291 | 26.0k | return end(); |
292 | 26.0k | } |
293 | | |
294 | 2.83k | iterator erase(iterator S, iterator E) { |
295 | 2.83k | assert(S >= begin() && "Range to erase is out of bounds."); |
296 | 2.83k | assert(S <= E && "Trying to erase invalid range."); |
297 | 2.83k | assert(E <= end() && "Trying to erase past the end."); |
298 | 2.83k | |
299 | 2.83k | if (Val.template is<EltTy>()) { |
300 | 2.44k | if (S == begin() && S != E1.17k ) |
301 | 1.17k | Val = (EltTy)nullptr; |
302 | 2.44k | } else if (VecTy *386 Vec386 = Val.template dyn_cast<VecTy*>()) { |
303 | 386 | return Vec->erase(S, E); |
304 | 386 | } |
305 | 2.44k | return end(); |
306 | 2.44k | } llvm::TinyPtrVector<llvm::AnalysisKey*>::erase(llvm::AnalysisKey**, llvm::AnalysisKey**) Line | Count | Source | 294 | 1.99k | iterator erase(iterator S, iterator E) { | 295 | 1.99k | assert(S >= begin() && "Range to erase is out of bounds."); | 296 | 1.99k | assert(S <= E && "Trying to erase invalid range."); | 297 | 1.99k | assert(E <= end() && "Trying to erase past the end."); | 298 | 1.99k | | 299 | 1.99k | if (Val.template is<EltTy>()) { | 300 | 1.99k | if (S == begin() && S != E995 ) | 301 | 995 | Val = (EltTy)nullptr; | 302 | 1.99k | } else if (VecTy *0 Vec0 = Val.template dyn_cast<VecTy*>()) { | 303 | 0 | return Vec->erase(S, E); | 304 | 0 | } | 305 | 1.99k | return end(); | 306 | 1.99k | } |
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 | 556 | iterator erase(iterator S, iterator E) { | 295 | 556 | assert(S >= begin() && "Range to erase is out of bounds."); | 296 | 556 | assert(S <= E && "Trying to erase invalid range."); | 297 | 556 | assert(E <= end() && "Trying to erase past the end."); | 298 | 556 | | 299 | 556 | if (Val.template is<EltTy>()) { | 300 | 270 | 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 | 270 | return end(); | 306 | 270 | } |
llvm::TinyPtrVector<clang::ModuleMacro*>::erase(clang::ModuleMacro**, clang::ModuleMacro**) Line | Count | Source | 294 | 214 | iterator erase(iterator S, iterator E) { | 295 | 214 | assert(S >= begin() && "Range to erase is out of bounds."); | 296 | 214 | assert(S <= E && "Trying to erase invalid range."); | 297 | 214 | assert(E <= end() && "Trying to erase past the end."); | 298 | 214 | | 299 | 214 | if (Val.template is<EltTy>()) { | 300 | 178 | if (S == begin() && S != E) | 301 | 178 | Val = (EltTy)nullptr; | 302 | 178 | } else if (VecTy *36 Vec36 = Val.template dyn_cast<VecTy*>()) { | 303 | 36 | return Vec->erase(S, E); | 304 | 36 | } | 305 | 178 | return end(); | 306 | 178 | } |
|
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 | 76.9M | iterator insert(iterator I, ItTy From, ItTy To) { |
328 | 76.9M | assert(I >= this->begin() && "Insertion iterator is out of bounds."); |
329 | 76.9M | assert(I <= this->end() && "Inserting past the end of the vector."); |
330 | 76.9M | if (From == To) |
331 | 75.9M | return I; |
332 | 984k | |
333 | 984k | // If we have a single value, convert to a vector. |
334 | 984k | ptrdiff_t Offset = I - begin(); |
335 | 984k | if (Val.isNull()) { |
336 | 955k | if (std::next(From) == To) { |
337 | 730k | Val = *From; |
338 | 730k | return begin(); |
339 | 730k | } |
340 | 225k | |
341 | 225k | Val = new VecTy(); |
342 | 225k | } else if (EltTy 28.9k V28.9k = Val.template dyn_cast<EltTy>()) { |
343 | 17.0k | Val = new VecTy(); |
344 | 17.0k | Val.template get<VecTy*>()->push_back(V); |
345 | 17.0k | } |
346 | 984k | return Val.template get<VecTy*>()->insert(begin() + Offset, From, To)254k ; |
347 | 984k | } 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 | 327 | 76.9M | iterator insert(iterator I, ItTy From, ItTy To) { | 328 | 76.9M | assert(I >= this->begin() && "Insertion iterator is out of bounds."); | 329 | 76.9M | assert(I <= this->end() && "Inserting past the end of the vector."); | 330 | 76.9M | if (From == To) | 331 | 75.9M | return I; | 332 | 983k | | 333 | 983k | // If we have a single value, convert to a vector. | 334 | 983k | ptrdiff_t Offset = I - begin(); | 335 | 983k | if (Val.isNull()) { | 336 | 955k | if (std::next(From) == To) { | 337 | 729k | Val = *From; | 338 | 729k | return begin(); | 339 | 729k | } | 340 | 225k | | 341 | 225k | Val = new VecTy(); | 342 | 225k | } else if (EltTy 28.7k V28.7k = Val.template dyn_cast<EltTy>()) { | 343 | 17.0k | Val = new VecTy(); | 344 | 17.0k | Val.template get<VecTy*>()->push_back(V); | 345 | 17.0k | } | 346 | 983k | return Val.template get<VecTy*>()->insert(begin() + Offset, From, To)254k ; | 347 | 983k | } |
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**>(clang::ModuleMacro**, clang::ModuleMacro**, clang::ModuleMacro**) Line | Count | Source | 327 | 1.53k | iterator insert(iterator I, ItTy From, ItTy To) { | 328 | 1.53k | assert(I >= this->begin() && "Insertion iterator is out of bounds."); | 329 | 1.53k | assert(I <= this->end() && "Inserting past the end of the vector."); | 330 | 1.53k | if (From == To) | 331 | 1.35k | return I; | 332 | 177 | | 333 | 177 | // If we have a single value, convert to a vector. | 334 | 177 | ptrdiff_t Offset = I - begin(); | 335 | 177 | if (Val.isNull()) { | 336 | 177 | if (std::next(From) == To) { | 337 | 156 | Val = *From; | 338 | 156 | return begin(); | 339 | 156 | } | 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 | 177 | return Val.template get<VecTy*>()->insert(begin() + Offset, From, To)21 ; | 347 | 177 | } |
clang::ModuleMacro** llvm::TinyPtrVector<clang::ModuleMacro*>::insert<clang::ModuleMacro* const*>(clang::ModuleMacro**, clang::ModuleMacro* const*, clang::ModuleMacro* const*) Line | Count | Source | 327 | 2.97k | iterator insert(iterator I, ItTy From, ItTy To) { | 328 | 2.97k | assert(I >= this->begin() && "Insertion iterator is out of bounds."); | 329 | 2.97k | assert(I <= this->end() && "Inserting past the end of the vector."); | 330 | 2.97k | if (From == To) | 331 | 2.97k | 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::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.9k | iterator insert(iterator I, ItTy From, ItTy To) { | 328 | 12.9k | assert(I >= this->begin() && "Insertion iterator is out of bounds."); | 329 | 12.9k | assert(I <= this->end() && "Inserting past the end of the vector."); | 330 | 12.9k | if (From == To) | 331 | 12.7k | 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 | } |
|
348 | | }; |
349 | | |
350 | | } // end namespace llvm |
351 | | |
352 | | #endif // LLVM_ADT_TINYPTRVECTOR_H |