Coverage Report

Created: 2020-02-18 08:44

/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/lib/CodeGen/EHScopeStack.h
Line
Count
Source (jump to first uncovered line)
1
//===-- EHScopeStack.h - Stack for cleanup IR generation --------*- 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
// These classes should be the minimum interface required for other parts of
10
// CodeGen to emit cleanups.  The implementation is in CGCleanup.cpp and other
11
// implemenentation details that are not widely needed are in CGCleanup.h.
12
//
13
//===----------------------------------------------------------------------===//
14
15
#ifndef LLVM_CLANG_LIB_CODEGEN_EHSCOPESTACK_H
16
#define LLVM_CLANG_LIB_CODEGEN_EHSCOPESTACK_H
17
18
#include "clang/Basic/LLVM.h"
19
#include "llvm/ADT/STLExtras.h"
20
#include "llvm/ADT/SmallVector.h"
21
#include "llvm/IR/BasicBlock.h"
22
#include "llvm/IR/Instructions.h"
23
#include "llvm/IR/Value.h"
24
25
namespace clang {
26
namespace CodeGen {
27
28
class CodeGenFunction;
29
30
/// A branch fixup.  These are required when emitting a goto to a
31
/// label which hasn't been emitted yet.  The goto is optimistically
32
/// emitted as a branch to the basic block for the label, and (if it
33
/// occurs in a scope with non-trivial cleanups) a fixup is added to
34
/// the innermost cleanup.  When a (normal) cleanup is popped, any
35
/// unresolved fixups in that scope are threaded through the cleanup.
36
struct BranchFixup {
37
  /// The block containing the terminator which needs to be modified
38
  /// into a switch if this fixup is resolved into the current scope.
39
  /// If null, LatestBranch points directly to the destination.
40
  llvm::BasicBlock *OptimisticBranchBlock;
41
42
  /// The ultimate destination of the branch.
43
  ///
44
  /// This can be set to null to indicate that this fixup was
45
  /// successfully resolved.
46
  llvm::BasicBlock *Destination;
47
48
  /// The destination index value.
49
  unsigned DestinationIndex;
50
51
  /// The initial branch of the fixup.
52
  llvm::BranchInst *InitialBranch;
53
};
54
55
template <class T> struct InvariantValue {
56
  typedef T type;
57
  typedef T saved_type;
58
  static bool needsSaving(type value) { return false; }
59
344
  static saved_type save(CodeGenFunction &CGF, type value) { return value; }
clang::CodeGen::InvariantValue<clang::QualType>::save(clang::CodeGen::CodeGenFunction&, clang::QualType)
Line
Count
Source
59
120
  static saved_type save(CodeGenFunction &CGF, type value) { return value; }
clang::CodeGen::InvariantValue<void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType)>::save(clang::CodeGen::CodeGenFunction&, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType))
Line
Count
Source
59
112
  static saved_type save(CodeGenFunction &CGF, type value) { return value; }
clang::CodeGen::InvariantValue<bool>::save(clang::CodeGen::CodeGenFunction&, bool)
Line
Count
Source
59
112
  static saved_type save(CodeGenFunction &CGF, type value) { return value; }
Unexecuted instantiation: clang::CodeGen::InvariantValue<clang::CharUnits>::save(clang::CodeGen::CodeGenFunction&, clang::CharUnits)
60
370
  static type restore(CodeGenFunction &CGF, saved_type value) { return value; }
clang::CodeGen::InvariantValue<clang::QualType>::restore(clang::CodeGen::CodeGenFunction&, clang::QualType)
Line
Count
Source
60
126
  static type restore(CodeGenFunction &CGF, saved_type value) { return value; }
clang::CodeGen::InvariantValue<void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType)>::restore(clang::CodeGen::CodeGenFunction&, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType))
Line
Count
Source
60
122
  static type restore(CodeGenFunction &CGF, saved_type value) { return value; }
clang::CodeGen::InvariantValue<bool>::restore(clang::CodeGen::CodeGenFunction&, bool)
Line
Count
Source
60
122
  static type restore(CodeGenFunction &CGF, saved_type value) { return value; }
Unexecuted instantiation: clang::CodeGen::InvariantValue<clang::CharUnits>::restore(clang::CodeGen::CodeGenFunction&, clang::CharUnits)
61
};
62
63
/// A metaprogramming class for ensuring that a value will dominate an
64
/// arbitrary position in a function.
65
template <class T> struct DominatingValue : InvariantValue<T> {};
66
67
template <class T, bool mightBeInstruction =
68
            std::is_base_of<llvm::Value, T>::value &&
69
            !std::is_base_of<llvm::Constant, T>::value &&
70
            !std::is_base_of<llvm::BasicBlock, T>::value>
71
struct DominatingPointer;
72
template <class T> struct DominatingPointer<T,false> : InvariantValue<T*> {};
73
// template <class T> struct DominatingPointer<T,true> at end of file
74
75
template <class T> struct DominatingValue<T*> : DominatingPointer<T> {};
76
77
enum CleanupKind : unsigned {
78
  /// Denotes a cleanup that should run when a scope is exited using exceptional
79
  /// control flow (a throw statement leading to stack unwinding, ).
80
  EHCleanup = 0x1,
81
82
  /// Denotes a cleanup that should run when a scope is exited using normal
83
  /// control flow (falling off the end of the scope, return, goto, ...).
84
  NormalCleanup = 0x2,
85
86
  NormalAndEHCleanup = EHCleanup | NormalCleanup,
87
88
  InactiveCleanup = 0x4,
89
  InactiveEHCleanup = EHCleanup | InactiveCleanup,
90
  InactiveNormalCleanup = NormalCleanup | InactiveCleanup,
91
  InactiveNormalAndEHCleanup = NormalAndEHCleanup | InactiveCleanup,
92
93
  LifetimeMarker = 0x8,
94
  NormalEHLifetimeMarker = LifetimeMarker | NormalAndEHCleanup,
95
};
96
97
/// A stack of scopes which respond to exceptions, including cleanups
98
/// and catch blocks.
99
class EHScopeStack {
100
public:
101
  /* Should switch to alignof(uint64_t) instead of 8, when EHCleanupScope can */
102
  enum { ScopeStackAlignment = 8 };
103
104
  /// A saved depth on the scope stack.  This is necessary because
105
  /// pushing scopes onto the stack invalidates iterators.
106
  class stable_iterator {
107
    friend class EHScopeStack;
108
109
    /// Offset from StartOfData to EndOfBuffer.
110
    ptrdiff_t Size;
111
112
3.69M
    stable_iterator(ptrdiff_t Size) : Size(Size) {}
113
114
  public:
115
114
    static stable_iterator invalid() { return stable_iterator(-1); }
116
2.53M
    stable_iterator() : Size(-1) {}
117
118
803k
    bool isValid() const { return Size >= 0; }
119
120
    /// Returns true if this scope encloses I.
121
    /// Returns false if I is invalid.
122
    /// This scope must be valid.
123
138k
    bool encloses(stable_iterator I) const { return Size <= I.Size; }
124
125
    /// Returns true if this scope strictly encloses I: that is,
126
    /// if it encloses I and is not I.
127
    /// Returns false is I is invalid.
128
    /// This scope must be valid.
129
44.2k
    bool strictlyEncloses(stable_iterator I) const { return Size < I.Size; }
130
131
144k
    friend bool operator==(stable_iterator A, stable_iterator B) {
132
144k
      return A.Size == B.Size;
133
144k
    }
134
1.39M
    friend bool operator!=(stable_iterator A, stable_iterator B) {
135
1.39M
      return A.Size != B.Size;
136
1.39M
    }
137
  };
138
139
  /// Information for lazily generating a cleanup.  Subclasses must be
140
  /// POD-like: cleanups will not be destructed, and they will be
141
  /// allocated on the cleanup stack and freely copied and moved
142
  /// around.
143
  ///
144
  /// Cleanup implementations should generally be declared in an
145
  /// anonymous namespace.
146
  class Cleanup {
147
    // Anchor the construction vtable.
148
    virtual void anchor();
149
150
  protected:
151
    ~Cleanup() = default;
152
153
  public:
154
    Cleanup(const Cleanup &) = default;
155
0
    Cleanup(Cleanup &&) {}
156
33.3k
    Cleanup() = default;
157
158
    /// Generation flags.
159
    class Flags {
160
      enum {
161
        F_IsForEH             = 0x1,
162
        F_IsNormalCleanupKind = 0x2,
163
        F_IsEHCleanupKind     = 0x4
164
      };
165
      unsigned flags;
166
167
    public:
168
28.8k
      Flags() : flags(0) {}
169
170
      /// isForEH - true if the current emission is for an EH cleanup.
171
17.8k
      bool isForEHCleanup() const { return flags & F_IsForEH; }
172
17.6k
      bool isForNormalCleanup() const { return !isForEHCleanup(); }
173
6.45k
      void setIsForEHCleanup() { flags |= F_IsForEH; }
174
175
0
      bool isNormalCleanupKind() const { return flags & F_IsNormalCleanupKind; }
176
27.3k
      void setIsNormalCleanupKind() { flags |= F_IsNormalCleanupKind; }
177
178
      /// isEHCleanupKind - true if the cleanup was pushed as an EH
179
      /// cleanup.
180
0
      bool isEHCleanupKind() const { return flags & F_IsEHCleanupKind; }
181
25.3k
      void setIsEHCleanupKind() { flags |= F_IsEHCleanupKind; }
182
    };
183
184
185
    /// Emit the cleanup.  For normal cleanups, this is run in the
186
    /// same EH context as when the cleanup was pushed, i.e. the
187
    /// immediately-enclosing context of the cleanup scope.  For
188
    /// EH cleanups, this is run in a terminate context.
189
    ///
190
    // \param flags cleanup kind.
191
    virtual void Emit(CodeGenFunction &CGF, Flags flags) = 0;
192
  };
193
194
  /// ConditionalCleanup stores the saved form of its parameters,
195
  /// then restores them and performs the cleanup.
196
  template <class T, class... As>
197
  class ConditionalCleanup final : public Cleanup {
198
    typedef std::tuple<typename DominatingValue<As>::saved_type...> SavedTuple;
199
    SavedTuple Saved;
200
201
    template <std::size_t... Is>
202
217
    T restore(CodeGenFunction &CGF, std::index_sequence<Is...>) {
203
217
      // It's important that the restores are emitted in order. The braced init
204
217
      // list guarantees that.
205
217
      return T{DominatingValue<As>::restore(CGF, std::get<Is>(Saved))...};
206
217
    }
Unexecuted instantiation: CGBuiltin.cpp:(anonymous namespace)::CallObjCArcUse clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::CallObjCArcUse, llvm::Value*>::restore<0ul>(clang::CodeGen::CodeGenFunction&, std::__1::integer_sequence<unsigned long, 0ul>)
CGCall.cpp:(anonymous namespace)::DestroyUnpassedArg clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::DestroyUnpassedArg, clang::CodeGen::Address, clang::QualType>::restore<0ul, 1ul>(clang::CodeGen::CodeGenFunction&, std::__1::integer_sequence<unsigned long, 0ul, 1ul>)
Line
Count
Source
202
4
    T restore(CodeGenFunction &CGF, std::index_sequence<Is...>) {
203
4
      // It's important that the restores are emitted in order. The braced init
204
4
      // list guarantees that.
205
4
      return T{DominatingValue<As>::restore(CGF, std::get<Is>(Saved))...};
206
4
    }
clang::CodeGen::CodeGenFunction::CallLifetimeEnd clang::CodeGen::EHScopeStack::ConditionalCleanup<clang::CodeGen::CodeGenFunction::CallLifetimeEnd, clang::CodeGen::Address, llvm::Value*>::restore<0ul, 1ul>(clang::CodeGen::CodeGenFunction&, std::__1::integer_sequence<unsigned long, 0ul, 1ul>)
Line
Count
Source
202
80
    T restore(CodeGenFunction &CGF, std::index_sequence<Is...>) {
203
80
      // It's important that the restores are emitted in order. The braced init
204
80
      // list guarantees that.
205
80
      return T{DominatingValue<As>::restore(CGF, std::get<Is>(Saved))...};
206
80
    }
CGDecl.cpp:(anonymous namespace)::DestroyObject clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::DestroyObject, clang::CodeGen::Address, clang::QualType, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType), bool>::restore<0ul, 1ul, 2ul, 3ul>(clang::CodeGen::CodeGenFunction&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul>)
Line
Count
Source
202
122
    T restore(CodeGenFunction &CGF, std::index_sequence<Is...>) {
203
122
      // It's important that the restores are emitted in order. The braced init
204
122
      // list guarantees that.
205
122
      return T{DominatingValue<As>::restore(CGF, std::get<Is>(Saved))...};
206
122
    }
Unexecuted instantiation: CGDecl.cpp:(anonymous namespace)::IrregularPartialArrayDestroy clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::IrregularPartialArrayDestroy, llvm::Value*, clang::CodeGen::Address, clang::QualType, clang::CharUnits, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType)>::restore<0ul, 1ul, 2ul, 3ul, 4ul>(clang::CodeGen::CodeGenFunction&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul, 4ul>)
Unexecuted instantiation: CGDecl.cpp:(anonymous namespace)::RegularPartialArrayDestroy clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::RegularPartialArrayDestroy, llvm::Value*, llvm::Value*, clang::QualType, clang::CharUnits, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType)>::restore<0ul, 1ul, 2ul, 3ul, 4ul>(clang::CodeGen::CodeGenFunction&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul, 4ul>)
CGException.cpp:(anonymous namespace)::FreeException clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::FreeException, llvm::Value*>::restore<0ul>(clang::CodeGen::CodeGenFunction&, std::__1::integer_sequence<unsigned long, 0ul>)
Line
Count
Source
202
2
    T restore(CodeGenFunction &CGF, std::index_sequence<Is...>) {
203
2
      // It's important that the restores are emitted in order. The braced init
204
2
      // list guarantees that.
205
2
      return T{DominatingValue<As>::restore(CGF, std::get<Is>(Saved))...};
206
2
    }
CGObjC.cpp:(anonymous namespace)::CallObjCRelease clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::CallObjCRelease, llvm::Value*>::restore<0ul>(clang::CodeGen::CodeGenFunction&, std::__1::integer_sequence<unsigned long, 0ul>)
Line
Count
Source
202
9
    T restore(CodeGenFunction &CGF, std::index_sequence<Is...>) {
203
9
      // It's important that the restores are emitted in order. The braced init
204
9
      // list guarantees that.
205
9
      return T{DominatingValue<As>::restore(CGF, std::get<Is>(Saved))...};
206
9
    }
207
208
217
    void Emit(CodeGenFunction &CGF, Flags flags) override {
209
217
      restore(CGF, std::index_sequence_for<As...>()).Emit(CGF, flags);
210
217
    }
Unexecuted instantiation: CGBuiltin.cpp:clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::CallObjCArcUse, llvm::Value*>::Emit(clang::CodeGen::CodeGenFunction&, clang::CodeGen::EHScopeStack::Cleanup::Flags)
CGCall.cpp:clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::DestroyUnpassedArg, clang::CodeGen::Address, clang::QualType>::Emit(clang::CodeGen::CodeGenFunction&, clang::CodeGen::EHScopeStack::Cleanup::Flags)
Line
Count
Source
208
4
    void Emit(CodeGenFunction &CGF, Flags flags) override {
209
4
      restore(CGF, std::index_sequence_for<As...>()).Emit(CGF, flags);
210
4
    }
clang::CodeGen::EHScopeStack::ConditionalCleanup<clang::CodeGen::CodeGenFunction::CallLifetimeEnd, clang::CodeGen::Address, llvm::Value*>::Emit(clang::CodeGen::CodeGenFunction&, clang::CodeGen::EHScopeStack::Cleanup::Flags)
Line
Count
Source
208
80
    void Emit(CodeGenFunction &CGF, Flags flags) override {
209
80
      restore(CGF, std::index_sequence_for<As...>()).Emit(CGF, flags);
210
80
    }
CGDecl.cpp:clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::DestroyObject, clang::CodeGen::Address, clang::QualType, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType), bool>::Emit(clang::CodeGen::CodeGenFunction&, clang::CodeGen::EHScopeStack::Cleanup::Flags)
Line
Count
Source
208
122
    void Emit(CodeGenFunction &CGF, Flags flags) override {
209
122
      restore(CGF, std::index_sequence_for<As...>()).Emit(CGF, flags);
210
122
    }
Unexecuted instantiation: CGDecl.cpp:clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::IrregularPartialArrayDestroy, llvm::Value*, clang::CodeGen::Address, clang::QualType, clang::CharUnits, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType)>::Emit(clang::CodeGen::CodeGenFunction&, clang::CodeGen::EHScopeStack::Cleanup::Flags)
Unexecuted instantiation: CGDecl.cpp:clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::RegularPartialArrayDestroy, llvm::Value*, llvm::Value*, clang::QualType, clang::CharUnits, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType)>::Emit(clang::CodeGen::CodeGenFunction&, clang::CodeGen::EHScopeStack::Cleanup::Flags)
CGException.cpp:clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::FreeException, llvm::Value*>::Emit(clang::CodeGen::CodeGenFunction&, clang::CodeGen::EHScopeStack::Cleanup::Flags)
Line
Count
Source
208
2
    void Emit(CodeGenFunction &CGF, Flags flags) override {
209
2
      restore(CGF, std::index_sequence_for<As...>()).Emit(CGF, flags);
210
2
    }
CGObjC.cpp:clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::CallObjCRelease, llvm::Value*>::Emit(clang::CodeGen::CodeGenFunction&, clang::CodeGen::EHScopeStack::Cleanup::Flags)
Line
Count
Source
208
9
    void Emit(CodeGenFunction &CGF, Flags flags) override {
209
9
      restore(CGF, std::index_sequence_for<As...>()).Emit(CGF, flags);
210
9
    }
211
212
  public:
213
    ConditionalCleanup(typename DominatingValue<As>::saved_type... A)
214
        : Saved(A...) {}
215
216
220
    ConditionalCleanup(SavedTuple Tuple) : Saved(std::move(Tuple)) {}
Unexecuted instantiation: CGBuiltin.cpp:clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::CallObjCArcUse, llvm::Value*>::ConditionalCleanup(std::__1::tuple<llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*> > > >)
CGCall.cpp:clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::DestroyUnpassedArg, clang::CodeGen::Address, clang::QualType>::ConditionalCleanup(std::__1::tuple<clang::CodeGen::DominatingValue<clang::CodeGen::Address>::saved_type, clang::QualType>)
Line
Count
Source
216
8
    ConditionalCleanup(SavedTuple Tuple) : Saved(std::move(Tuple)) {}
clang::CodeGen::EHScopeStack::ConditionalCleanup<clang::CodeGen::CodeGenFunction::CallLifetimeEnd, clang::CodeGen::Address, llvm::Value*>::ConditionalCleanup(std::__1::tuple<clang::CodeGen::DominatingValue<clang::CodeGen::Address>::saved_type, llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*> > > >)
Line
Count
Source
216
78
    ConditionalCleanup(SavedTuple Tuple) : Saved(std::move(Tuple)) {}
CGDecl.cpp:clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::DestroyObject, clang::CodeGen::Address, clang::QualType, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType), bool>::ConditionalCleanup(std::__1::tuple<clang::CodeGen::DominatingValue<clang::CodeGen::Address>::saved_type, clang::QualType, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType), bool>)
Line
Count
Source
216
112
    ConditionalCleanup(SavedTuple Tuple) : Saved(std::move(Tuple)) {}
Unexecuted instantiation: CGDecl.cpp:clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::IrregularPartialArrayDestroy, llvm::Value*, clang::CodeGen::Address, clang::QualType, clang::CharUnits, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType)>::ConditionalCleanup(std::__1::tuple<llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*> > >, clang::CodeGen::DominatingValue<clang::CodeGen::Address>::saved_type, clang::QualType, clang::CharUnits, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType)>)
Unexecuted instantiation: CGDecl.cpp:clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::RegularPartialArrayDestroy, llvm::Value*, llvm::Value*, clang::QualType, clang::CharUnits, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType)>::ConditionalCleanup(std::__1::tuple<llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*> > >, llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*> > >, clang::QualType, clang::CharUnits, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType)>)
CGException.cpp:clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::FreeException, llvm::Value*>::ConditionalCleanup(std::__1::tuple<llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*> > > >)
Line
Count
Source
216
13
    ConditionalCleanup(SavedTuple Tuple) : Saved(std::move(Tuple)) {}
CGObjC.cpp:clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::CallObjCRelease, llvm::Value*>::ConditionalCleanup(std::__1::tuple<llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*> > > >)
Line
Count
Source
216
9
    ConditionalCleanup(SavedTuple Tuple) : Saved(std::move(Tuple)) {}
217
  };
218
219
private:
220
  // The implementation for this class is in CGException.h and
221
  // CGException.cpp; the definition is here because it's used as a
222
  // member of CodeGenFunction.
223
224
  /// The start of the scope-stack buffer, i.e. the allocated pointer
225
  /// for the buffer.  All of these pointers are either simultaneously
226
  /// null or simultaneously valid.
227
  char *StartOfBuffer;
228
229
  /// The end of the buffer.
230
  char *EndOfBuffer;
231
232
  /// The first valid entry in the buffer.
233
  char *StartOfData;
234
235
  /// The innermost normal cleanup on the stack.
236
  stable_iterator InnermostNormalCleanup;
237
238
  /// The innermost EH scope on the stack.
239
  stable_iterator InnermostEHScope;
240
241
  /// The current set of branch fixups.  A branch fixup is a jump to
242
  /// an as-yet unemitted label, i.e. a label for which we don't yet
243
  /// know the EH stack depth.  Whenever we pop a cleanup, we have
244
  /// to thread all the current branch fixups through it.
245
  ///
246
  /// Fixups are recorded as the Use of the respective branch or
247
  /// switch statement.  The use points to the final destination.
248
  /// When popping out of a cleanup, these uses are threaded through
249
  /// the cleanup and adjusted to point to the new cleanup.
250
  ///
251
  /// Note that branches are allowed to jump into protected scopes
252
  /// in certain situations;  e.g. the following code is legal:
253
  ///     struct A { ~A(); }; // trivial ctor, non-trivial dtor
254
  ///     goto foo;
255
  ///     A a;
256
  ///    foo:
257
  ///     bar();
258
  SmallVector<BranchFixup, 8> BranchFixups;
259
260
  char *allocate(size_t Size);
261
  void deallocate(size_t Size);
262
263
  void *pushCleanup(CleanupKind K, size_t DataSize);
264
265
public:
266
  EHScopeStack() : StartOfBuffer(nullptr), EndOfBuffer(nullptr),
267
                   StartOfData(nullptr), InnermostNormalCleanup(stable_end()),
268
243k
                   InnermostEHScope(stable_end()) {}
269
243k
  ~EHScopeStack() { delete[] StartOfBuffer; }
270
271
  /// Push a lazily-created cleanup on the stack.
272
32.0k
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
32.0k
    static_assert(alignof(T) <= ScopeStackAlignment,
274
32.0k
                  "Cleanup's alignment is too large.");
275
32.0k
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
32.0k
    Cleanup *Obj = new (Buffer) T(A...);
277
32.0k
    (void) Obj;
278
32.0k
  }
CGBlocks.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallBlockRelease, clang::CodeGen::Address, clang::CodeGen::BlockFieldFlags, bool, bool>(clang::CodeGen::CleanupKind, clang::CodeGen::Address, clang::CodeGen::BlockFieldFlags, bool, bool)
Line
Count
Source
272
515
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
515
    static_assert(alignof(T) <= ScopeStackAlignment,
274
515
                  "Cleanup's alignment is too large.");
275
515
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
515
    Cleanup *Obj = new (Buffer) T(A...);
277
515
    (void) Obj;
278
515
  }
CGBuiltin.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallObjCArcUse, llvm::Value*>(clang::CodeGen::CleanupKind, llvm::Value*)
Line
Count
Source
272
2
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
2
    static_assert(alignof(T) <= ScopeStackAlignment,
274
2
                  "Cleanup's alignment is too large.");
275
2
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
2
    Cleanup *Obj = new (Buffer) T(A...);
277
2
    (void) Obj;
278
2
  }
CGCall.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CopyBackSwiftError, clang::CodeGen::Address, clang::CodeGen::Address>(clang::CodeGen::CleanupKind, clang::CodeGen::Address, clang::CodeGen::Address)
Line
Count
Source
272
16
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
16
    static_assert(alignof(T) <= ScopeStackAlignment,
274
16
                  "Cleanup's alignment is too large.");
275
16
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
16
    Cleanup *Obj = new (Buffer) T(A...);
277
16
    (void) Obj;
278
16
  }
CGCall.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::DestroyUnpassedArg, clang::CodeGen::Address, clang::QualType>(clang::CodeGen::CleanupKind, clang::CodeGen::Address, clang::QualType)
Line
Count
Source
272
159
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
159
    static_assert(alignof(T) <= ScopeStackAlignment,
274
159
                  "Cleanup's alignment is too large.");
275
159
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
159
    Cleanup *Obj = new (Buffer) T(A...);
277
159
    (void) Obj;
278
159
  }
void clang::CodeGen::EHScopeStack::pushCleanup<clang::CodeGen::CodeGenFunction::CallLifetimeEnd, clang::CodeGen::Address, llvm::Value*>(clang::CodeGen::CleanupKind, clang::CodeGen::Address, llvm::Value*)
Line
Count
Source
272
4.53k
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
4.53k
    static_assert(alignof(T) <= ScopeStackAlignment,
274
4.53k
                  "Cleanup's alignment is too large.");
275
4.53k
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
4.53k
    Cleanup *Obj = new (Buffer) T(A...);
277
4.53k
    (void) Obj;
278
4.53k
  }
CGClass.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallBaseDtor, clang::CXXRecordDecl const*, bool>(clang::CodeGen::CleanupKind, clang::CXXRecordDecl const*, bool)
Line
Count
Source
272
1.15k
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
1.15k
    static_assert(alignof(T) <= ScopeStackAlignment,
274
1.15k
                  "Cleanup's alignment is too large.");
275
1.15k
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
1.15k
    Cleanup *Obj = new (Buffer) T(A...);
277
1.15k
    (void) Obj;
278
1.15k
  }
CGClass.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallDtorDeleteConditional, llvm::Value*>(clang::CodeGen::CleanupKind, llvm::Value*)
Line
Count
Source
272
199
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
199
    static_assert(alignof(T) <= ScopeStackAlignment,
274
199
                  "Cleanup's alignment is too large.");
275
199
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
199
    Cleanup *Obj = new (Buffer) T(A...);
277
199
    (void) Obj;
278
199
  }
CGClass.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallDtorDelete>(clang::CodeGen::CleanupKind)
Line
Count
Source
272
567
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
567
    static_assert(alignof(T) <= ScopeStackAlignment,
274
567
                  "Cleanup's alignment is too large.");
275
567
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
567
    Cleanup *Obj = new (Buffer) T(A...);
277
567
    (void) Obj;
278
567
  }
CGClass.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::SanitizeDtorVTable, clang::CXXDestructorDecl const*>(clang::CodeGen::CleanupKind, clang::CXXDestructorDecl const*)
Line
Count
Source
272
18
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
18
    static_assert(alignof(T) <= ScopeStackAlignment,
274
18
                  "Cleanup's alignment is too large.");
275
18
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
18
    Cleanup *Obj = new (Buffer) T(A...);
277
18
    (void) Obj;
278
18
  }
CGClass.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallBaseDtor, clang::CXXRecordDecl*, bool>(clang::CodeGen::CleanupKind, clang::CXXRecordDecl*, bool)
Line
Count
Source
272
1.30k
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
1.30k
    static_assert(alignof(T) <= ScopeStackAlignment,
274
1.30k
                  "Cleanup's alignment is too large.");
275
1.30k
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
1.30k
    Cleanup *Obj = new (Buffer) T(A...);
277
1.30k
    (void) Obj;
278
1.30k
  }
CGClass.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::SanitizeDtorMembers, clang::CXXDestructorDecl const*>(clang::CodeGen::CleanupKind, clang::CXXDestructorDecl const*)
Line
Count
Source
272
38
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
38
    static_assert(alignof(T) <= ScopeStackAlignment,
274
38
                  "Cleanup's alignment is too large.");
275
38
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
38
    Cleanup *Obj = new (Buffer) T(A...);
277
38
    (void) Obj;
278
38
  }
CGClass.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::DestroyField, clang::FieldDecl const*, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType), unsigned int>(clang::CodeGen::CleanupKind, clang::FieldDecl const*, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType), unsigned int)
Line
Count
Source
272
921
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
921
    static_assert(alignof(T) <= ScopeStackAlignment,
274
921
                  "Cleanup's alignment is too large.");
275
921
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
921
    Cleanup *Obj = new (Buffer) T(A...);
277
921
    (void) Obj;
278
921
  }
CGClass.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallDelegatingCtorDtor, clang::CXXDestructorDecl*, clang::CodeGen::Address, clang::CXXDtorType>(clang::CodeGen::CleanupKind, clang::CXXDestructorDecl*, clang::CodeGen::Address, clang::CXXDtorType)
Line
Count
Source
272
65
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
65
    static_assert(alignof(T) <= ScopeStackAlignment,
274
65
                  "Cleanup's alignment is too large.");
275
65
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
65
    Cleanup *Obj = new (Buffer) T(A...);
277
65
    (void) Obj;
278
65
  }
CGClass.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallLocalDtor, clang::CXXDestructorDecl const*, clang::CodeGen::Address, clang::QualType>(clang::CodeGen::CleanupKind, clang::CXXDestructorDecl const*, clang::CodeGen::Address, clang::QualType)
Line
Count
Source
272
9
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
9
    static_assert(alignof(T) <= ScopeStackAlignment,
274
9
                  "Cleanup's alignment is too large.");
275
9
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
9
    Cleanup *Obj = new (Buffer) T(A...);
277
9
    (void) Obj;
278
9
  }
CGCoroutine.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallCoroDelete, clang::Expr*>(clang::CodeGen::CleanupKind, clang::Expr*)
Line
Count
Source
272
42
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
42
    static_assert(alignof(T) <= ScopeStackAlignment,
274
42
                  "Cleanup's alignment is too large.");
275
42
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
42
    Cleanup *Obj = new (Buffer) T(A...);
277
42
    (void) Obj;
278
42
  }
CGCoroutine.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallCoroEnd>(clang::CodeGen::CleanupKind)
Line
Count
Source
272
42
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
42
    static_assert(alignof(T) <= ScopeStackAlignment,
274
42
                  "Cleanup's alignment is too large.");
275
42
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
42
    Cleanup *Obj = new (Buffer) T(A...);
277
42
    (void) Obj;
278
42
  }
CGDecl.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::DestroyNRVOVariableCXX, clang::CodeGen::Address, clang::QualType, clang::CXXDestructorDecl*, llvm::Value*>(clang::CodeGen::CleanupKind, clang::CodeGen::Address, clang::QualType, clang::CXXDestructorDecl*, llvm::Value*)
Line
Count
Source
272
188
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
188
    static_assert(alignof(T) <= ScopeStackAlignment,
274
188
                  "Cleanup's alignment is too large.");
275
188
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
188
    Cleanup *Obj = new (Buffer) T(A...);
277
188
    (void) Obj;
278
188
  }
CGDecl.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::DestroyNRVOVariableC, clang::CodeGen::Address, llvm::Value*, clang::QualType>(clang::CodeGen::CleanupKind, clang::CodeGen::Address, llvm::Value*, clang::QualType)
Line
Count
Source
272
3
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
3
    static_assert(alignof(T) <= ScopeStackAlignment,
274
3
                  "Cleanup's alignment is too large.");
275
3
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
3
    Cleanup *Obj = new (Buffer) T(A...);
277
3
    (void) Obj;
278
3
  }
CGDecl.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::DestroyObject, clang::CodeGen::Address, clang::QualType, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType), bool>(clang::CodeGen::CleanupKind, clang::CodeGen::Address, clang::QualType, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType), bool)
Line
Count
Source
272
12.8k
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
12.8k
    static_assert(alignof(T) <= ScopeStackAlignment,
274
12.8k
                  "Cleanup's alignment is too large.");
275
12.8k
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
12.8k
    Cleanup *Obj = new (Buffer) T(A...);
277
12.8k
    (void) Obj;
278
12.8k
  }
CGDecl.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::ExtendGCLifetime, clang::VarDecl const*>(clang::CodeGen::CleanupKind, clang::VarDecl const*)
Line
Count
Source
272
1
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
1
    static_assert(alignof(T) <= ScopeStackAlignment,
274
1
                  "Cleanup's alignment is too large.");
275
1
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
1
    Cleanup *Obj = new (Buffer) T(A...);
277
1
    (void) Obj;
278
1
  }
CGDecl.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallCleanupFunction, llvm::Constant*, clang::CodeGen::CGFunctionInfo const*, clang::VarDecl const*>(clang::CodeGen::CleanupKind, llvm::Constant*, clang::CodeGen::CGFunctionInfo const*, clang::VarDecl const*)
Line
Count
Source
272
9
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
9
    static_assert(alignof(T) <= ScopeStackAlignment,
274
9
                  "Cleanup's alignment is too large.");
275
9
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
9
    Cleanup *Obj = new (Buffer) T(A...);
277
9
    (void) Obj;
278
9
  }
CGDecl.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallStackRestore, clang::CodeGen::Address>(clang::CodeGen::CleanupKind, clang::CodeGen::Address)
Line
Count
Source
272
1.23k
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
1.23k
    static_assert(alignof(T) <= ScopeStackAlignment,
274
1.23k
                  "Cleanup's alignment is too large.");
275
1.23k
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
1.23k
    Cleanup *Obj = new (Buffer) T(A...);
277
1.23k
    (void) Obj;
278
1.23k
  }
CGDecl.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::IrregularPartialArrayDestroy, llvm::Value*, clang::CodeGen::Address, clang::QualType, clang::CharUnits, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType)>(clang::CodeGen::CleanupKind, llvm::Value*, clang::CodeGen::Address, clang::QualType, clang::CharUnits, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType))
Line
Count
Source
272
54
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
54
    static_assert(alignof(T) <= ScopeStackAlignment,
274
54
                  "Cleanup's alignment is too large.");
275
54
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
54
    Cleanup *Obj = new (Buffer) T(A...);
277
54
    (void) Obj;
278
54
  }
CGDecl.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::RegularPartialArrayDestroy, llvm::Value*, llvm::Value*, clang::QualType, clang::CharUnits, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType)>(clang::CodeGen::CleanupKind, llvm::Value*, llvm::Value*, clang::QualType, clang::CharUnits, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType))
Line
Count
Source
272
1.84k
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
1.84k
    static_assert(alignof(T) <= ScopeStackAlignment,
274
1.84k
                  "Cleanup's alignment is too large.");
275
1.84k
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
1.84k
    Cleanup *Obj = new (Buffer) T(A...);
277
1.84k
    (void) Obj;
278
1.84k
  }
Unexecuted instantiation: CGDecl.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::ConsumeARCParameter, llvm::Value*, clang::CodeGen::ARCPreciseLifetime_t>(clang::CodeGen::CleanupKind, llvm::Value*, clang::CodeGen::ARCPreciseLifetime_t)
CGException.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::FreeException, llvm::Value*>(clang::CodeGen::CleanupKind, llvm::Value*)
Line
Count
Source
272
404
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
404
    static_assert(alignof(T) <= ScopeStackAlignment,
274
404
                  "Cleanup's alignment is too large.");
275
404
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
404
    Cleanup *Obj = new (Buffer) T(A...);
277
404
    (void) Obj;
278
404
  }
CGException.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::PerformFinally, clang::Stmt const*, llvm::AllocaInst*, llvm::FunctionCallee, llvm::FunctionCallee, llvm::AllocaInst*>(clang::CodeGen::CleanupKind, clang::Stmt const*, llvm::AllocaInst*, llvm::FunctionCallee, llvm::FunctionCallee, llvm::AllocaInst*)
Line
Count
Source
272
10
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
10
    static_assert(alignof(T) <= ScopeStackAlignment,
274
10
                  "Cleanup's alignment is too large.");
275
10
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
10
    Cleanup *Obj = new (Buffer) T(A...);
277
10
    (void) Obj;
278
10
  }
CGException.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallEndCatchForFinally, llvm::Value*, llvm::FunctionCallee>(clang::CodeGen::CleanupKind, llvm::Value*, llvm::FunctionCallee)
Line
Count
Source
272
8
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
8
    static_assert(alignof(T) <= ScopeStackAlignment,
274
8
                  "Cleanup's alignment is too large.");
275
8
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
8
    Cleanup *Obj = new (Buffer) T(A...);
277
8
    (void) Obj;
278
8
  }
CGException.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::PerformSEHFinally, llvm::Function*>(clang::CodeGen::CleanupKind, llvm::Function*)
Line
Count
Source
272
75
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
75
    static_assert(alignof(T) <= ScopeStackAlignment,
274
75
                  "Cleanup's alignment is too large.");
275
75
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
75
    Cleanup *Obj = new (Buffer) T(A...);
277
75
    (void) Obj;
278
75
  }
CGExprCXX.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallArrayDelete, llvm::Value*, clang::FunctionDecl const*, llvm::Value*, clang::QualType, clang::CharUnits>(clang::CodeGen::CleanupKind, llvm::Value*, clang::FunctionDecl const*, llvm::Value*, clang::QualType, clang::CharUnits)
Line
Count
Source
272
231
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
231
    static_assert(alignof(T) <= ScopeStackAlignment,
274
231
                  "Cleanup's alignment is too large.");
275
231
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
231
    Cleanup *Obj = new (Buffer) T(A...);
277
231
    (void) Obj;
278
231
  }
CGExprCXX.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallObjectDelete, llvm::Value*, clang::FunctionDecl const*, clang::QualType>(clang::CodeGen::CleanupKind, llvm::Value*, clang::FunctionDecl const*, clang::QualType)
Line
Count
Source
272
493
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
493
    static_assert(alignof(T) <= ScopeStackAlignment,
274
493
                  "Cleanup's alignment is too large.");
275
493
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
493
    Cleanup *Obj = new (Buffer) T(A...);
277
493
    (void) Obj;
278
493
  }
CGObjC.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::DestroyIvar, llvm::Value*, clang::ObjCIvarDecl const*, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType), unsigned int>(clang::CodeGen::CleanupKind, llvm::Value*, clang::ObjCIvarDecl const*, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType), unsigned int)
Line
Count
Source
272
107
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
107
    static_assert(alignof(T) <= ScopeStackAlignment,
274
107
                  "Cleanup's alignment is too large.");
275
107
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
107
    Cleanup *Obj = new (Buffer) T(A...);
277
107
    (void) Obj;
278
107
  }
CGObjC.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::FinishARCDealloc>(clang::CodeGen::CleanupKind)
Line
Count
Source
272
8
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
8
    static_assert(alignof(T) <= ScopeStackAlignment,
274
8
                  "Cleanup's alignment is too large.");
275
8
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
8
    Cleanup *Obj = new (Buffer) T(A...);
277
8
    (void) Obj;
278
8
  }
CGObjC.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallObjCRelease, llvm::Value*>(clang::CodeGen::CleanupKind, llvm::Value*)
Line
Count
Source
272
261
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
261
    static_assert(alignof(T) <= ScopeStackAlignment,
274
261
                  "Cleanup's alignment is too large.");
275
261
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
261
    Cleanup *Obj = new (Buffer) T(A...);
277
261
    (void) Obj;
278
261
  }
CGObjC.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallObjCAutoreleasePoolObject, llvm::Value*>(clang::CodeGen::CleanupKind, llvm::Value*)
Line
Count
Source
272
100
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
100
    static_assert(alignof(T) <= ScopeStackAlignment,
274
100
                  "Cleanup's alignment is too large.");
275
100
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
100
    Cleanup *Obj = new (Buffer) T(A...);
277
100
    (void) Obj;
278
100
  }
CGObjC.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallObjCMRRAutoreleasePoolObject, llvm::Value*>(clang::CodeGen::CleanupKind, llvm::Value*)
Line
Count
Source
272
17
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
17
    static_assert(alignof(T) <= ScopeStackAlignment,
274
17
                  "Cleanup's alignment is too large.");
275
17
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
17
    Cleanup *Obj = new (Buffer) T(A...);
277
17
    (void) Obj;
278
17
  }
CGObjCMac.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::PerformFragileFinally, clang::Stmt const*, clang::CodeGen::Address, clang::CodeGen::Address, clang::CodeGen::Address, (anonymous namespace)::ObjCTypesHelper*>(clang::CodeGen::CleanupKind, clang::Stmt const*, clang::CodeGen::Address, clang::CodeGen::Address, clang::CodeGen::Address, (anonymous namespace)::ObjCTypesHelper*)
Line
Count
Source
272
41
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
41
    static_assert(alignof(T) <= ScopeStackAlignment,
274
41
                  "Cleanup's alignment is too large.");
275
41
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
41
    Cleanup *Obj = new (Buffer) T(A...);
277
41
    (void) Obj;
278
41
  }
CGObjCRuntime.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallObjCEndCatch, bool, llvm::FunctionCallee>(clang::CodeGen::CleanupKind, bool, llvm::FunctionCallee)
Line
Count
Source
272
174
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
174
    static_assert(alignof(T) <= ScopeStackAlignment,
274
174
                  "Cleanup's alignment is too large.");
275
174
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
174
    Cleanup *Obj = new (Buffer) T(A...);
277
174
    (void) Obj;
278
174
  }
void clang::CodeGen::EHScopeStack::pushCleanup<clang::CodeGen::CatchRetScope, llvm::CatchPadInst*>(clang::CodeGen::CleanupKind, llvm::CatchPadInst*)
Line
Count
Source
272
84
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
84
    static_assert(alignof(T) <= ScopeStackAlignment,
274
84
                  "Cleanup's alignment is too large.");
275
84
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
84
    Cleanup *Obj = new (Buffer) T(A...);
277
84
    (void) Obj;
278
84
  }
CGObjCRuntime.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallSyncExit, llvm::FunctionCallee, llvm::Value*>(clang::CodeGen::CleanupKind, llvm::FunctionCallee, llvm::Value*)
Line
Count
Source
272
7
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
7
    static_assert(alignof(T) <= ScopeStackAlignment,
274
7
                  "Cleanup's alignment is too large.");
275
7
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
7
    Cleanup *Obj = new (Buffer) T(A...);
277
7
    (void) Obj;
278
7
  }
CGOpenMPRuntime.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CleanupTy, clang::CodeGen::PrePostActionTy*>(clang::CodeGen::CleanupKind, clang::CodeGen::PrePostActionTy*)
Line
Count
Source
272
3.61k
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
3.61k
    static_assert(alignof(T) <= ScopeStackAlignment,
274
3.61k
                  "Cleanup's alignment is too large.");
275
3.61k
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
3.61k
    Cleanup *Obj = new (Buffer) T(A...);
277
3.61k
    (void) Obj;
278
3.61k
  }
CGOpenMPRuntime.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::DoacrossCleanupTy, llvm::FunctionCallee, llvm::ArrayRef<llvm::Value*> >(clang::CodeGen::CleanupKind, llvm::FunctionCallee, llvm::ArrayRef<llvm::Value*>)
Line
Count
Source
272
12
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
12
    static_assert(alignof(T) <= ScopeStackAlignment,
274
12
                  "Cleanup's alignment is too large.");
275
12
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
12
    Cleanup *Obj = new (Buffer) T(A...);
277
12
    (void) Obj;
278
12
  }
CGOpenMPRuntime.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::OMPAllocateCleanupTy, llvm::FunctionCallee, llvm::ArrayRef<llvm::Value*> >(clang::CodeGen::CleanupKind, llvm::FunctionCallee, llvm::ArrayRef<llvm::Value*>)
Line
Count
Source
272
40
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
40
    static_assert(alignof(T) <= ScopeStackAlignment,
274
40
                  "Cleanup's alignment is too large.");
275
40
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
40
    Cleanup *Obj = new (Buffer) T(A...);
277
40
    (void) Obj;
278
40
  }
CGOpenMPRuntimeNVPTX.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<clang::CodeGen::CGOpenMPRuntimeNVPTX::emitFunctionProlog(clang::CodeGen::CodeGenFunction&, clang::Decl const*)::GlobalizationScope>(clang::CodeGen::CleanupKind)
Line
Count
Source
272
4
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
4
    static_assert(alignof(T) <= ScopeStackAlignment,
274
4
                  "Cleanup's alignment is too large.");
275
4
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
4
    Cleanup *Obj = new (Buffer) T(A...);
277
4
    (void) Obj;
278
4
  }
ItaniumCXXABI.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallEndCatch, bool>(clang::CodeGen::CleanupKind, bool)
Line
Count
Source
272
292
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
292
    static_assert(alignof(T) <= ScopeStackAlignment,
274
292
                  "Cleanup's alignment is too large.");
275
292
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
292
    Cleanup *Obj = new (Buffer) T(A...);
277
292
    (void) Obj;
278
292
  }
ItaniumCXXABI.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallGuardAbort, llvm::GlobalVariable*>(clang::CodeGen::CleanupKind, llvm::GlobalVariable*)
Line
Count
Source
272
164
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
164
    static_assert(alignof(T) <= ScopeStackAlignment,
274
164
                  "Cleanup's alignment is too large.");
275
164
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
164
    Cleanup *Obj = new (Buffer) T(A...);
277
164
    (void) Obj;
278
164
  }
MicrosoftCXXABI.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::ResetGuardBit, clang::CodeGen::ConstantAddress, unsigned int>(clang::CodeGen::CleanupKind, clang::CodeGen::ConstantAddress, unsigned int)
Line
Count
Source
272
58
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
58
    static_assert(alignof(T) <= ScopeStackAlignment,
274
58
                  "Cleanup's alignment is too large.");
275
58
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
58
    Cleanup *Obj = new (Buffer) T(A...);
277
58
    (void) Obj;
278
58
  }
MicrosoftCXXABI.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallInitThreadAbort, clang::CodeGen::ConstantAddress>(clang::CodeGen::CleanupKind, clang::CodeGen::ConstantAddress)
Line
Count
Source
272
36
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
273
36
    static_assert(alignof(T) <= ScopeStackAlignment,
274
36
                  "Cleanup's alignment is too large.");
275
36
    void *Buffer = pushCleanup(Kind, sizeof(T));
276
36
    Cleanup *Obj = new (Buffer) T(A...);
277
36
    (void) Obj;
278
36
  }
279
280
  /// Push a lazily-created cleanup on the stack. Tuple version.
281
  template <class T, class... As>
282
210
  void pushCleanupTuple(CleanupKind Kind, std::tuple<As...> A) {
283
210
    static_assert(alignof(T) <= ScopeStackAlignment,
284
210
                  "Cleanup's alignment is too large.");
285
210
    void *Buffer = pushCleanup(Kind, sizeof(T));
286
210
    Cleanup *Obj = new (Buffer) T(std::move(A));
287
210
    (void) Obj;
288
210
  }
Unexecuted instantiation: CGBuiltin.cpp:void clang::CodeGen::EHScopeStack::pushCleanupTuple<clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::CallObjCArcUse, llvm::Value*>, llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*> > > >(clang::CodeGen::CleanupKind, std::__1::tuple<llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*> > > >)
CGCall.cpp:void clang::CodeGen::EHScopeStack::pushCleanupTuple<clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::DestroyUnpassedArg, clang::CodeGen::Address, clang::QualType>, clang::CodeGen::DominatingValue<clang::CodeGen::Address>::saved_type, clang::QualType>(clang::CodeGen::CleanupKind, std::__1::tuple<clang::CodeGen::DominatingValue<clang::CodeGen::Address>::saved_type, clang::QualType>)
Line
Count
Source
282
8
  void pushCleanupTuple(CleanupKind Kind, std::tuple<As...> A) {
283
8
    static_assert(alignof(T) <= ScopeStackAlignment,
284
8
                  "Cleanup's alignment is too large.");
285
8
    void *Buffer = pushCleanup(Kind, sizeof(T));
286
8
    Cleanup *Obj = new (Buffer) T(std::move(A));
287
8
    (void) Obj;
288
8
  }
void clang::CodeGen::EHScopeStack::pushCleanupTuple<clang::CodeGen::EHScopeStack::ConditionalCleanup<clang::CodeGen::CodeGenFunction::CallLifetimeEnd, clang::CodeGen::Address, llvm::Value*>, clang::CodeGen::DominatingValue<clang::CodeGen::Address>::saved_type, llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*> > > >(clang::CodeGen::CleanupKind, std::__1::tuple<clang::CodeGen::DominatingValue<clang::CodeGen::Address>::saved_type, llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*> > > >)
Line
Count
Source
282
78
  void pushCleanupTuple(CleanupKind Kind, std::tuple<As...> A) {
283
78
    static_assert(alignof(T) <= ScopeStackAlignment,
284
78
                  "Cleanup's alignment is too large.");
285
78
    void *Buffer = pushCleanup(Kind, sizeof(T));
286
78
    Cleanup *Obj = new (Buffer) T(std::move(A));
287
78
    (void) Obj;
288
78
  }
CGDecl.cpp:void clang::CodeGen::EHScopeStack::pushCleanupTuple<clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::DestroyObject, clang::CodeGen::Address, clang::QualType, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType), bool>, clang::CodeGen::DominatingValue<clang::CodeGen::Address>::saved_type, clang::QualType, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType), bool>(clang::CodeGen::CleanupKind, std::__1::tuple<clang::CodeGen::DominatingValue<clang::CodeGen::Address>::saved_type, clang::QualType, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType), bool>)
Line
Count
Source
282
102
  void pushCleanupTuple(CleanupKind Kind, std::tuple<As...> A) {
283
102
    static_assert(alignof(T) <= ScopeStackAlignment,
284
102
                  "Cleanup's alignment is too large.");
285
102
    void *Buffer = pushCleanup(Kind, sizeof(T));
286
102
    Cleanup *Obj = new (Buffer) T(std::move(A));
287
102
    (void) Obj;
288
102
  }
Unexecuted instantiation: CGDecl.cpp:void clang::CodeGen::EHScopeStack::pushCleanupTuple<clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::IrregularPartialArrayDestroy, llvm::Value*, clang::CodeGen::Address, clang::QualType, clang::CharUnits, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType)>, llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*> > >, clang::CodeGen::DominatingValue<clang::CodeGen::Address>::saved_type, clang::QualType, clang::CharUnits, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType)>(clang::CodeGen::CleanupKind, std::__1::tuple<llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*> > >, clang::CodeGen::DominatingValue<clang::CodeGen::Address>::saved_type, clang::QualType, clang::CharUnits, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType)>)
Unexecuted instantiation: CGDecl.cpp:void clang::CodeGen::EHScopeStack::pushCleanupTuple<clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::RegularPartialArrayDestroy, llvm::Value*, llvm::Value*, clang::QualType, clang::CharUnits, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType)>, llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*> > >, llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*> > >, clang::QualType, clang::CharUnits, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType)>(clang::CodeGen::CleanupKind, std::__1::tuple<llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*> > >, llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*> > >, clang::QualType, clang::CharUnits, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType)>)
CGException.cpp:void clang::CodeGen::EHScopeStack::pushCleanupTuple<clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::FreeException, llvm::Value*>, llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*> > > >(clang::CodeGen::CleanupKind, std::__1::tuple<llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*> > > >)
Line
Count
Source
282
13
  void pushCleanupTuple(CleanupKind Kind, std::tuple<As...> A) {
283
13
    static_assert(alignof(T) <= ScopeStackAlignment,
284
13
                  "Cleanup's alignment is too large.");
285
13
    void *Buffer = pushCleanup(Kind, sizeof(T));
286
13
    Cleanup *Obj = new (Buffer) T(std::move(A));
287
13
    (void) Obj;
288
13
  }
CGObjC.cpp:void clang::CodeGen::EHScopeStack::pushCleanupTuple<clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::CallObjCRelease, llvm::Value*>, llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*> > > >(clang::CodeGen::CleanupKind, std::__1::tuple<llvm::PointerIntPair<llvm::Value*, 1u, bool, llvm::PointerLikeTypeTraits<llvm::Value*>, llvm::PointerIntPairInfo<llvm::Value*, 1u, llvm::PointerLikeTypeTraits<llvm::Value*> > > >)
Line
Count
Source
282
9
  void pushCleanupTuple(CleanupKind Kind, std::tuple<As...> A) {
283
9
    static_assert(alignof(T) <= ScopeStackAlignment,
284
9
                  "Cleanup's alignment is too large.");
285
9
    void *Buffer = pushCleanup(Kind, sizeof(T));
286
9
    Cleanup *Obj = new (Buffer) T(std::move(A));
287
9
    (void) Obj;
288
9
  }
289
290
  // Feel free to add more variants of the following:
291
292
  /// Push a cleanup with non-constant storage requirements on the
293
  /// stack.  The cleanup type must provide an additional static method:
294
  ///   static size_t getExtraSize(size_t);
295
  /// The argument to this method will be the value N, which will also
296
  /// be passed as the first argument to the constructor.
297
  ///
298
  /// The data stored in the extra storage must obey the same
299
  /// restrictions as normal cleanup member data.
300
  ///
301
  /// The pointer returned from this method is valid until the cleanup
302
  /// stack is modified.
303
  template <class T, class... As>
304
780
  T *pushCleanupWithExtra(CleanupKind Kind, size_t N, As... A) {
305
780
    static_assert(alignof(T) <= ScopeStackAlignment,
306
780
                  "Cleanup's alignment is too large.");
307
780
    void *Buffer = pushCleanup(Kind, sizeof(T) + T::getExtraSize(N));
308
780
    return new (Buffer) T(N, A...);
309
780
  }
CGExprCXX.cpp:(anonymous namespace)::CallDeleteDuringNew<EnterNewDeleteCleanup(clang::CodeGen::CodeGenFunction&, clang::CXXNewExpr const*, clang::CodeGen::Address, llvm::Value*, clang::CharUnits, clang::CodeGen::CallArgList const&)::DirectCleanupTraits>* clang::CodeGen::EHScopeStack::pushCleanupWithExtra<(anonymous namespace)::CallDeleteDuringNew<EnterNewDeleteCleanup(clang::CodeGen::CodeGenFunction&, clang::CXXNewExpr const*, clang::CodeGen::Address, llvm::Value*, clang::CharUnits, clang::CodeGen::CallArgList const&)::DirectCleanupTraits>, clang::FunctionDecl*, llvm::Value*, llvm::Value*, bool, clang::CharUnits>(clang::CodeGen::CleanupKind, unsigned long, clang::FunctionDecl*, llvm::Value*, llvm::Value*, bool, clang::CharUnits)
Line
Count
Source
304
774
  T *pushCleanupWithExtra(CleanupKind Kind, size_t N, As... A) {
305
774
    static_assert(alignof(T) <= ScopeStackAlignment,
306
774
                  "Cleanup's alignment is too large.");
307
774
    void *Buffer = pushCleanup(Kind, sizeof(T) + T::getExtraSize(N));
308
774
    return new (Buffer) T(N, A...);
309
774
  }
CGExprCXX.cpp:(anonymous namespace)::CallDeleteDuringNew<EnterNewDeleteCleanup(clang::CodeGen::CodeGenFunction&, clang::CXXNewExpr const*, clang::CodeGen::Address, llvm::Value*, clang::CharUnits, clang::CodeGen::CallArgList const&)::ConditionalCleanupTraits>* clang::CodeGen::EHScopeStack::pushCleanupWithExtra<(anonymous namespace)::CallDeleteDuringNew<EnterNewDeleteCleanup(clang::CodeGen::CodeGenFunction&, clang::CXXNewExpr const*, clang::CodeGen::Address, llvm::Value*, clang::CharUnits, clang::CodeGen::CallArgList const&)::ConditionalCleanupTraits>, clang::FunctionDecl*, clang::CodeGen::DominatingValue<clang::CodeGen::RValue>::saved_type, clang::CodeGen::DominatingValue<clang::CodeGen::RValue>::saved_type, bool, clang::CharUnits>(clang::CodeGen::CleanupKind, unsigned long, clang::FunctionDecl*, clang::CodeGen::DominatingValue<clang::CodeGen::RValue>::saved_type, clang::CodeGen::DominatingValue<clang::CodeGen::RValue>::saved_type, bool, clang::CharUnits)
Line
Count
Source
304
6
  T *pushCleanupWithExtra(CleanupKind Kind, size_t N, As... A) {
305
6
    static_assert(alignof(T) <= ScopeStackAlignment,
306
6
                  "Cleanup's alignment is too large.");
307
6
    void *Buffer = pushCleanup(Kind, sizeof(T) + T::getExtraSize(N));
308
6
    return new (Buffer) T(N, A...);
309
6
  }
310
311
130
  void pushCopyOfCleanup(CleanupKind Kind, const void *Cleanup, size_t Size) {
312
130
    void *Buffer = pushCleanup(Kind, Size);
313
130
    std::memcpy(Buffer, Cleanup, Size);
314
130
  }
315
316
  /// Pops a cleanup scope off the stack.  This is private to CGCleanup.cpp.
317
  void popCleanup();
318
319
  /// Push a set of catch handlers on the stack.  The catch is
320
  /// uninitialized and will need to have the given number of handlers
321
  /// set on it.
322
  class EHCatchScope *pushCatch(unsigned NumHandlers);
323
324
  /// Pops a catch scope off the stack.  This is private to CGException.cpp.
325
  void popCatch();
326
327
  /// Push an exceptions filter on the stack.
328
  class EHFilterScope *pushFilter(unsigned NumFilters);
329
330
  /// Pops an exceptions filter off the stack.
331
  void popFilter();
332
333
  /// Push a terminate handler on the stack.
334
  void pushTerminate();
335
336
  /// Pops a terminate handler off the stack.
337
  void popTerminate();
338
339
  // Returns true iff the current scope is either empty or contains only
340
  // lifetime markers, i.e. no real cleanup code
341
  bool containsOnlyLifetimeMarkers(stable_iterator Old) const;
342
343
  /// Determines whether the exception-scopes stack is empty.
344
442k
  bool empty() const { return StartOfData == EndOfBuffer; }
345
346
  bool requiresLandingPad() const;
347
348
  /// Determines whether there are any normal cleanups on the stack.
349
39.1k
  bool hasNormalCleanups() const {
350
39.1k
    return InnermostNormalCleanup != stable_end();
351
39.1k
  }
352
353
  /// Returns the innermost normal cleanup on the stack, or
354
  /// stable_end() if there are no normal cleanups.
355
438k
  stable_iterator getInnermostNormalCleanup() const {
356
438k
    return InnermostNormalCleanup;
357
438k
  }
358
  stable_iterator getInnermostActiveNormalCleanup() const;
359
360
277k
  stable_iterator getInnermostEHScope() const {
361
277k
    return InnermostEHScope;
362
277k
  }
363
364
365
  /// An unstable reference to a scope-stack depth.  Invalidated by
366
  /// pushes but not pops.
367
  class iterator;
368
369
  /// Returns an iterator pointing to the innermost EH scope.
370
  iterator begin() const;
371
372
  /// Returns an iterator pointing to the outermost EH scope.
373
  iterator end() const;
374
375
  /// Create a stable reference to the top of the EH stack.  The
376
  /// returned reference is valid until that scope is popped off the
377
  /// stack.
378
2.24M
  stable_iterator stable_begin() const {
379
2.24M
    return stable_iterator(EndOfBuffer - StartOfData);
380
2.24M
  }
381
382
  /// Create a stable reference to the bottom of the EH stack.
383
1.43M
  static stable_iterator stable_end() {
384
1.43M
    return stable_iterator(0);
385
1.43M
  }
386
387
  /// Translates an iterator into a stable_iterator.
388
  stable_iterator stabilize(iterator it) const;
389
390
  /// Turn a stable reference to a scope depth into a unstable pointer
391
  /// to the EH stack.
392
  iterator find(stable_iterator save) const;
393
394
  /// Add a branch fixup to the current cleanup scope.
395
3.00k
  BranchFixup &addBranchFixup() {
396
3.00k
    assert(hasNormalCleanups() && "adding fixup in scope without cleanups");
397
3.00k
    BranchFixups.push_back(BranchFixup());
398
3.00k
    return BranchFixups.back();
399
3.00k
  }
400
401
105k
  unsigned getNumBranchFixups() const { return BranchFixups.size(); }
402
3.02k
  BranchFixup &getBranchFixup(unsigned I) {
403
3.02k
    assert(I < getNumBranchFixups());
404
3.02k
    return BranchFixups[I];
405
3.02k
  }
406
407
  /// Pops lazily-removed fixups from the end of the list.  This
408
  /// should only be called by procedures which have just popped a
409
  /// cleanup or resolved one or more fixups.
410
  void popNullFixups();
411
412
  /// Clears the branch-fixups list.  This should only be called by
413
  /// ResolveAllBranchFixups.
414
3
  void clearFixups() { BranchFixups.clear(); }
415
};
416
417
} // namespace CodeGen
418
} // namespace clang
419
420
#endif