Coverage Report

Created: 2020-11-24 06:42

/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
368
  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
128
  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
120
  static saved_type save(CodeGenFunction &CGF, type value) { return value; }
clang::CodeGen::InvariantValue<bool>::save(clang::CodeGen::CodeGenFunction&, bool)
Line
Count
Source
59
120
  static saved_type save(CodeGenFunction &CGF, type value) { return value; }
Unexecuted instantiation: clang::CodeGen::InvariantValue<clang::CharUnits>::save(clang::CodeGen::CodeGenFunction&, clang::CharUnits)
60
490
  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
166
  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
162
  static type restore(CodeGenFunction &CGF, saved_type value) { return value; }
clang::CodeGen::InvariantValue<bool>::restore(clang::CodeGen::CodeGenFunction&, bool)
Line
Count
Source
60
162
  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
  LifetimeMarker = 0x8,
89
  NormalEHLifetimeMarker = LifetimeMarker | NormalAndEHCleanup,
90
};
91
92
/// A stack of scopes which respond to exceptions, including cleanups
93
/// and catch blocks.
94
class EHScopeStack {
95
public:
96
  /* Should switch to alignof(uint64_t) instead of 8, when EHCleanupScope can */
97
  enum { ScopeStackAlignment = 8 };
98
99
  /// A saved depth on the scope stack.  This is necessary because
100
  /// pushing scopes onto the stack invalidates iterators.
101
  class stable_iterator {
102
    friend class EHScopeStack;
103
104
    /// Offset from StartOfData to EndOfBuffer.
105
    ptrdiff_t Size;
106
107
4.47M
    stable_iterator(ptrdiff_t Size) : Size(Size) {}
108
109
  public:
110
140
    static stable_iterator invalid() { return stable_iterator(-1); }
111
3.14M
    stable_iterator() : Size(-1) {}
112
113
973k
    bool isValid() const { return Size >= 0; }
114
115
    /// Returns true if this scope encloses I.
116
    /// Returns false if I is invalid.
117
    /// This scope must be valid.
118
165k
    bool encloses(stable_iterator I) const { return Size <= I.Size; }
119
120
    /// Returns true if this scope strictly encloses I: that is,
121
    /// if it encloses I and is not I.
122
    /// Returns false is I is invalid.
123
    /// This scope must be valid.
124
57.9k
    bool strictlyEncloses(stable_iterator I) const { return Size < I.Size; }
125
126
171k
    friend bool operator==(stable_iterator A, stable_iterator B) {
127
171k
      return A.Size == B.Size;
128
171k
    }
129
1.66M
    friend bool operator!=(stable_iterator A, stable_iterator B) {
130
1.66M
      return A.Size != B.Size;
131
1.66M
    }
132
  };
133
134
  /// Information for lazily generating a cleanup.  Subclasses must be
135
  /// POD-like: cleanups will not be destructed, and they will be
136
  /// allocated on the cleanup stack and freely copied and moved
137
  /// around.
138
  ///
139
  /// Cleanup implementations should generally be declared in an
140
  /// anonymous namespace.
141
  class Cleanup {
142
    // Anchor the construction vtable.
143
    virtual void anchor();
144
145
  protected:
146
    ~Cleanup() = default;
147
148
  public:
149
    Cleanup(const Cleanup &) = default;
150
0
    Cleanup(Cleanup &&) {}
151
47.8k
    Cleanup() = default;
152
153
    /// Generation flags.
154
    class Flags {
155
      enum {
156
        F_IsForEH = 0x1,
157
        F_IsNormalCleanupKind = 0x2,
158
        F_IsEHCleanupKind = 0x4,
159
        F_HasExitSwitch = 0x8,
160
      };
161
      unsigned flags;
162
163
    public:
164
43.0k
      Flags() : flags(0) {}
165
166
      /// isForEH - true if the current emission is for an EH cleanup.
167
18.5k
      bool isForEHCleanup() const { return flags & F_IsForEH; }
168
18.3k
      bool isForNormalCleanup() const { return !isForEHCleanup(); }
169
6.78k
      void setIsForEHCleanup() { flags |= F_IsForEH; }
170
171
0
      bool isNormalCleanupKind() const { return flags & F_IsNormalCleanupKind; }
172
41.4k
      void setIsNormalCleanupKind() { flags |= F_IsNormalCleanupKind; }
173
174
      /// isEHCleanupKind - true if the cleanup was pushed as an EH
175
      /// cleanup.
176
0
      bool isEHCleanupKind() const { return flags & F_IsEHCleanupKind; }
177
39.0k
      void setIsEHCleanupKind() { flags |= F_IsEHCleanupKind; }
178
179
77
      bool hasExitSwitch() const { return flags & F_HasExitSwitch; }
180
224
      void setHasExitSwitch() { flags |= F_HasExitSwitch; }
181
    };
182
183
    /// Emit the cleanup.  For normal cleanups, this is run in the
184
    /// same EH context as when the cleanup was pushed, i.e. the
185
    /// immediately-enclosing context of the cleanup scope.  For
186
    /// EH cleanups, this is run in a terminate context.
187
    ///
188
    // \param flags cleanup kind.
189
    virtual void Emit(CodeGenFunction &CGF, Flags flags) = 0;
190
  };
191
192
  /// ConditionalCleanup stores the saved form of its parameters,
193
  /// then restores them and performs the cleanup.
194
  template <class T, class... As>
195
  class ConditionalCleanup final : public Cleanup {
196
    typedef std::tuple<typename DominatingValue<As>::saved_type...> SavedTuple;
197
    SavedTuple Saved;
198
199
    template <std::size_t... Is>
200
261
    T restore(CodeGenFunction &CGF, std::index_sequence<Is...>) {
201
      // It's important that the restores are emitted in order. The braced init
202
      // list guarantees that.
203
261
      return T{DominatingValue<As>::restore(CGF, std::get<Is>(Saved))...};
204
261
    }
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
200
4
    T restore(CodeGenFunction &CGF, std::index_sequence<Is...>) {
201
      // It's important that the restores are emitted in order. The braced init
202
      // list guarantees that.
203
4
      return T{DominatingValue<As>::restore(CGF, std::get<Is>(Saved))...};
204
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
200
80
    T restore(CodeGenFunction &CGF, std::index_sequence<Is...>) {
201
      // It's important that the restores are emitted in order. The braced init
202
      // list guarantees that.
203
80
      return T{DominatingValue<As>::restore(CGF, std::get<Is>(Saved))...};
204
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
200
162
    T restore(CodeGenFunction &CGF, std::index_sequence<Is...>) {
201
      // It's important that the restores are emitted in order. The braced init
202
      // list guarantees that.
203
162
      return T{DominatingValue<As>::restore(CGF, std::get<Is>(Saved))...};
204
162
    }
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
200
2
    T restore(CodeGenFunction &CGF, std::index_sequence<Is...>) {
201
      // It's important that the restores are emitted in order. The braced init
202
      // list guarantees that.
203
2
      return T{DominatingValue<As>::restore(CGF, std::get<Is>(Saved))...};
204
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
200
13
    T restore(CodeGenFunction &CGF, std::index_sequence<Is...>) {
201
      // It's important that the restores are emitted in order. The braced init
202
      // list guarantees that.
203
13
      return T{DominatingValue<As>::restore(CGF, std::get<Is>(Saved))...};
204
13
    }
205
206
261
    void Emit(CodeGenFunction &CGF, Flags flags) override {
207
261
      restore(CGF, std::index_sequence_for<As...>()).Emit(CGF, flags);
208
261
    }
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
206
4
    void Emit(CodeGenFunction &CGF, Flags flags) override {
207
4
      restore(CGF, std::index_sequence_for<As...>()).Emit(CGF, flags);
208
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
206
80
    void Emit(CodeGenFunction &CGF, Flags flags) override {
207
80
      restore(CGF, std::index_sequence_for<As...>()).Emit(CGF, flags);
208
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
206
162
    void Emit(CodeGenFunction &CGF, Flags flags) override {
207
162
      restore(CGF, std::index_sequence_for<As...>()).Emit(CGF, flags);
208
162
    }
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
206
2
    void Emit(CodeGenFunction &CGF, Flags flags) override {
207
2
      restore(CGF, std::index_sequence_for<As...>()).Emit(CGF, flags);
208
2
    }
CGObjC.cpp:clang::CodeGen::EHScopeStack::ConditionalCleanup<(anonymous namespace)::CallObjCRelease, llvm::Value*>::Emit(clang::CodeGen::CodeGenFunction&, clang::CodeGen::EHScopeStack::Cleanup::Flags)
Line
Count
Source
206
13
    void Emit(CodeGenFunction &CGF, Flags flags) override {
207
13
      restore(CGF, std::index_sequence_for<As...>()).Emit(CGF, flags);
208
13
    }
209
210
  public:
211
    ConditionalCleanup(typename DominatingValue<As>::saved_type... A)
212
43
        : Saved(A...) {}
213
214
232
    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
214
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
214
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
214
120
    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
214
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
214
13
    ConditionalCleanup(SavedTuple Tuple) : Saved(std::move(Tuple)) {}
215
  };
216
217
private:
218
  // The implementation for this class is in CGException.h and
219
  // CGException.cpp; the definition is here because it's used as a
220
  // member of CodeGenFunction.
221
222
  /// The start of the scope-stack buffer, i.e. the allocated pointer
223
  /// for the buffer.  All of these pointers are either simultaneously
224
  /// null or simultaneously valid.
225
  char *StartOfBuffer;
226
227
  /// The end of the buffer.
228
  char *EndOfBuffer;
229
230
  /// The first valid entry in the buffer.
231
  char *StartOfData;
232
233
  /// The innermost normal cleanup on the stack.
234
  stable_iterator InnermostNormalCleanup;
235
236
  /// The innermost EH scope on the stack.
237
  stable_iterator InnermostEHScope;
238
239
  /// The current set of branch fixups.  A branch fixup is a jump to
240
  /// an as-yet unemitted label, i.e. a label for which we don't yet
241
  /// know the EH stack depth.  Whenever we pop a cleanup, we have
242
  /// to thread all the current branch fixups through it.
243
  ///
244
  /// Fixups are recorded as the Use of the respective branch or
245
  /// switch statement.  The use points to the final destination.
246
  /// When popping out of a cleanup, these uses are threaded through
247
  /// the cleanup and adjusted to point to the new cleanup.
248
  ///
249
  /// Note that branches are allowed to jump into protected scopes
250
  /// in certain situations;  e.g. the following code is legal:
251
  ///     struct A { ~A(); }; // trivial ctor, non-trivial dtor
252
  ///     goto foo;
253
  ///     A a;
254
  ///    foo:
255
  ///     bar();
256
  SmallVector<BranchFixup, 8> BranchFixups;
257
258
  char *allocate(size_t Size);
259
  void deallocate(size_t Size);
260
261
  void *pushCleanup(CleanupKind K, size_t DataSize);
262
263
public:
264
  EHScopeStack() : StartOfBuffer(nullptr), EndOfBuffer(nullptr),
265
                   StartOfData(nullptr), InnermostNormalCleanup(stable_end()),
266
294k
                   InnermostEHScope(stable_end()) {}
267
294k
  ~EHScopeStack() { delete[] StartOfBuffer; }
268
269
  /// Push a lazily-created cleanup on the stack.
270
46.0k
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
46.0k
    static_assert(alignof(T) <= ScopeStackAlignment,
272
46.0k
                  "Cleanup's alignment is too large.");
273
46.0k
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
46.0k
    Cleanup *Obj = new (Buffer) T(A...);
275
46.0k
    (void) Obj;
276
46.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
270
517
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
517
    static_assert(alignof(T) <= ScopeStackAlignment,
272
517
                  "Cleanup's alignment is too large.");
273
517
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
517
    Cleanup *Obj = new (Buffer) T(A...);
275
517
    (void) Obj;
276
517
  }
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
270
16
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
16
    static_assert(alignof(T) <= ScopeStackAlignment,
272
16
                  "Cleanup's alignment is too large.");
273
16
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
16
    Cleanup *Obj = new (Buffer) T(A...);
275
16
    (void) Obj;
276
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
270
160
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
160
    static_assert(alignof(T) <= ScopeStackAlignment,
272
160
                  "Cleanup's alignment is too large.");
273
160
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
160
    Cleanup *Obj = new (Buffer) T(A...);
275
160
    (void) Obj;
276
160
  }
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
270
5.73k
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
5.73k
    static_assert(alignof(T) <= ScopeStackAlignment,
272
5.73k
                  "Cleanup's alignment is too large.");
273
5.73k
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
5.73k
    Cleanup *Obj = new (Buffer) T(A...);
275
5.73k
    (void) Obj;
276
5.73k
  }
CGClass.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallBaseDtor, clang::CXXRecordDecl const*, bool>(clang::CodeGen::CleanupKind, clang::CXXRecordDecl const*, bool)
Line
Count
Source
270
1.16k
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
1.16k
    static_assert(alignof(T) <= ScopeStackAlignment,
272
1.16k
                  "Cleanup's alignment is too large.");
273
1.16k
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
1.16k
    Cleanup *Obj = new (Buffer) T(A...);
275
1.16k
    (void) Obj;
276
1.16k
  }
CGClass.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallDtorDeleteConditional, llvm::Value*>(clang::CodeGen::CleanupKind, llvm::Value*)
Line
Count
Source
270
203
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
203
    static_assert(alignof(T) <= ScopeStackAlignment,
272
203
                  "Cleanup's alignment is too large.");
273
203
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
203
    Cleanup *Obj = new (Buffer) T(A...);
275
203
    (void) Obj;
276
203
  }
CGClass.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallDtorDelete>(clang::CodeGen::CleanupKind)
Line
Count
Source
270
641
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
641
    static_assert(alignof(T) <= ScopeStackAlignment,
272
641
                  "Cleanup's alignment is too large.");
273
641
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
641
    Cleanup *Obj = new (Buffer) T(A...);
275
641
    (void) Obj;
276
641
  }
CGClass.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::SanitizeDtorVTable, clang::CXXDestructorDecl const*>(clang::CodeGen::CleanupKind, clang::CXXDestructorDecl const*)
Line
Count
Source
270
18
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
18
    static_assert(alignof(T) <= ScopeStackAlignment,
272
18
                  "Cleanup's alignment is too large.");
273
18
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
18
    Cleanup *Obj = new (Buffer) T(A...);
275
18
    (void) Obj;
276
18
  }
CGClass.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallBaseDtor, clang::CXXRecordDecl*, bool>(clang::CodeGen::CleanupKind, clang::CXXRecordDecl*, bool)
Line
Count
Source
270
1.34k
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
1.34k
    static_assert(alignof(T) <= ScopeStackAlignment,
272
1.34k
                  "Cleanup's alignment is too large.");
273
1.34k
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
1.34k
    Cleanup *Obj = new (Buffer) T(A...);
275
1.34k
    (void) Obj;
276
1.34k
  }
CGClass.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::SanitizeDtorMembers, clang::CXXDestructorDecl const*>(clang::CodeGen::CleanupKind, clang::CXXDestructorDecl const*)
Line
Count
Source
270
38
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
38
    static_assert(alignof(T) <= ScopeStackAlignment,
272
38
                  "Cleanup's alignment is too large.");
273
38
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
38
    Cleanup *Obj = new (Buffer) T(A...);
275
38
    (void) Obj;
276
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
270
969
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
969
    static_assert(alignof(T) <= ScopeStackAlignment,
272
969
                  "Cleanup's alignment is too large.");
273
969
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
969
    Cleanup *Obj = new (Buffer) T(A...);
275
969
    (void) Obj;
276
969
  }
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
270
65
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
65
    static_assert(alignof(T) <= ScopeStackAlignment,
272
65
                  "Cleanup's alignment is too large.");
273
65
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
65
    Cleanup *Obj = new (Buffer) T(A...);
275
65
    (void) Obj;
276
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
270
9
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
9
    static_assert(alignof(T) <= ScopeStackAlignment,
272
9
                  "Cleanup's alignment is too large.");
273
9
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
9
    Cleanup *Obj = new (Buffer) T(A...);
275
9
    (void) Obj;
276
9
  }
CGCoroutine.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallCoroDelete, clang::Expr*>(clang::CodeGen::CleanupKind, clang::Expr*)
Line
Count
Source
270
53
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
53
    static_assert(alignof(T) <= ScopeStackAlignment,
272
53
                  "Cleanup's alignment is too large.");
273
53
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
53
    Cleanup *Obj = new (Buffer) T(A...);
275
53
    (void) Obj;
276
53
  }
CGCoroutine.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallCoroEnd>(clang::CodeGen::CleanupKind)
Line
Count
Source
270
53
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
53
    static_assert(alignof(T) <= ScopeStackAlignment,
272
53
                  "Cleanup's alignment is too large.");
273
53
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
53
    Cleanup *Obj = new (Buffer) T(A...);
275
53
    (void) Obj;
276
53
  }
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
270
194
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
194
    static_assert(alignof(T) <= ScopeStackAlignment,
272
194
                  "Cleanup's alignment is too large.");
273
194
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
194
    Cleanup *Obj = new (Buffer) T(A...);
275
194
    (void) Obj;
276
194
  }
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
270
3
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
3
    static_assert(alignof(T) <= ScopeStackAlignment,
272
3
                  "Cleanup's alignment is too large.");
273
3
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
3
    Cleanup *Obj = new (Buffer) T(A...);
275
3
    (void) Obj;
276
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
270
12.9k
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
12.9k
    static_assert(alignof(T) <= ScopeStackAlignment,
272
12.9k
                  "Cleanup's alignment is too large.");
273
12.9k
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
12.9k
    Cleanup *Obj = new (Buffer) T(A...);
275
12.9k
    (void) Obj;
276
12.9k
  }
CGDecl.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::ExtendGCLifetime, clang::VarDecl const*>(clang::CodeGen::CleanupKind, clang::VarDecl const*)
Line
Count
Source
270
1
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
1
    static_assert(alignof(T) <= ScopeStackAlignment,
272
1
                  "Cleanup's alignment is too large.");
273
1
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
1
    Cleanup *Obj = new (Buffer) T(A...);
275
1
    (void) Obj;
276
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
270
8
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
8
    static_assert(alignof(T) <= ScopeStackAlignment,
272
8
                  "Cleanup's alignment is too large.");
273
8
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
8
    Cleanup *Obj = new (Buffer) T(A...);
275
8
    (void) Obj;
276
8
  }
CGDecl.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallStackRestore, clang::CodeGen::Address>(clang::CodeGen::CleanupKind, clang::CodeGen::Address)
Line
Count
Source
270
1.58k
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
1.58k
    static_assert(alignof(T) <= ScopeStackAlignment,
272
1.58k
                  "Cleanup's alignment is too large.");
273
1.58k
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
1.58k
    Cleanup *Obj = new (Buffer) T(A...);
275
1.58k
    (void) Obj;
276
1.58k
  }
CGDecl.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<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, clang::CodeGen::DominatingValue<clang::CodeGen::Address>::saved_type, clang::QualType, void (*)(clang::CodeGen::CodeGenFunction&, clang::CodeGen::Address, clang::QualType), bool)
Line
Count
Source
270
15
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
15
    static_assert(alignof(T) <= ScopeStackAlignment,
272
15
                  "Cleanup's alignment is too large.");
273
15
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
15
    Cleanup *Obj = new (Buffer) T(A...);
275
15
    (void) Obj;
276
15
  }
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
270
72
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
72
    static_assert(alignof(T) <= ScopeStackAlignment,
272
72
                  "Cleanup's alignment is too large.");
273
72
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
72
    Cleanup *Obj = new (Buffer) T(A...);
275
72
    (void) Obj;
276
72
  }
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
270
1.88k
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
1.88k
    static_assert(alignof(T) <= ScopeStackAlignment,
272
1.88k
                  "Cleanup's alignment is too large.");
273
1.88k
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
1.88k
    Cleanup *Obj = new (Buffer) T(A...);
275
1.88k
    (void) Obj;
276
1.88k
  }
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
270
432
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
432
    static_assert(alignof(T) <= ScopeStackAlignment,
272
432
                  "Cleanup's alignment is too large.");
273
432
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
432
    Cleanup *Obj = new (Buffer) T(A...);
275
432
    (void) Obj;
276
432
  }
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
270
10
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
10
    static_assert(alignof(T) <= ScopeStackAlignment,
272
10
                  "Cleanup's alignment is too large.");
273
10
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
10
    Cleanup *Obj = new (Buffer) T(A...);
275
10
    (void) Obj;
276
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
270
8
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
8
    static_assert(alignof(T) <= ScopeStackAlignment,
272
8
                  "Cleanup's alignment is too large.");
273
8
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
8
    Cleanup *Obj = new (Buffer) T(A...);
275
8
    (void) Obj;
276
8
  }
CGException.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::PerformSEHFinally, llvm::Function*>(clang::CodeGen::CleanupKind, llvm::Function*)
Line
Count
Source
270
77
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
77
    static_assert(alignof(T) <= ScopeStackAlignment,
272
77
                  "Cleanup's alignment is too large.");
273
77
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
77
    Cleanup *Obj = new (Buffer) T(A...);
275
77
    (void) Obj;
276
77
  }
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
270
242
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
242
    static_assert(alignof(T) <= ScopeStackAlignment,
272
242
                  "Cleanup's alignment is too large.");
273
242
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
242
    Cleanup *Obj = new (Buffer) T(A...);
275
242
    (void) Obj;
276
242
  }
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
270
526
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
526
    static_assert(alignof(T) <= ScopeStackAlignment,
272
526
                  "Cleanup's alignment is too large.");
273
526
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
526
    Cleanup *Obj = new (Buffer) T(A...);
275
526
    (void) Obj;
276
526
  }
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
270
108
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
108
    static_assert(alignof(T) <= ScopeStackAlignment,
272
108
                  "Cleanup's alignment is too large.");
273
108
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
108
    Cleanup *Obj = new (Buffer) T(A...);
275
108
    (void) Obj;
276
108
  }
CGObjC.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::FinishARCDealloc>(clang::CodeGen::CleanupKind)
Line
Count
Source
270
8
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
8
    static_assert(alignof(T) <= ScopeStackAlignment,
272
8
                  "Cleanup's alignment is too large.");
273
8
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
8
    Cleanup *Obj = new (Buffer) T(A...);
275
8
    (void) Obj;
276
8
  }
CGObjC.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallObjCRelease, llvm::Value*>(clang::CodeGen::CleanupKind, llvm::Value*)
Line
Count
Source
270
271
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
271
    static_assert(alignof(T) <= ScopeStackAlignment,
272
271
                  "Cleanup's alignment is too large.");
273
271
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
271
    Cleanup *Obj = new (Buffer) T(A...);
275
271
    (void) Obj;
276
271
  }
CGObjC.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallObjCAutoreleasePoolObject, llvm::Value*>(clang::CodeGen::CleanupKind, llvm::Value*)
Line
Count
Source
270
100
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
100
    static_assert(alignof(T) <= ScopeStackAlignment,
272
100
                  "Cleanup's alignment is too large.");
273
100
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
100
    Cleanup *Obj = new (Buffer) T(A...);
275
100
    (void) Obj;
276
100
  }
CGObjC.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallObjCMRRAutoreleasePoolObject, llvm::Value*>(clang::CodeGen::CleanupKind, llvm::Value*)
Line
Count
Source
270
17
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
17
    static_assert(alignof(T) <= ScopeStackAlignment,
272
17
                  "Cleanup's alignment is too large.");
273
17
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
17
    Cleanup *Obj = new (Buffer) T(A...);
275
17
    (void) Obj;
276
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
270
41
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
41
    static_assert(alignof(T) <= ScopeStackAlignment,
272
41
                  "Cleanup's alignment is too large.");
273
41
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
41
    Cleanup *Obj = new (Buffer) T(A...);
275
41
    (void) Obj;
276
41
  }
CGObjCRuntime.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallObjCEndCatch, bool, llvm::FunctionCallee>(clang::CodeGen::CleanupKind, bool, llvm::FunctionCallee)
Line
Count
Source
270
174
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
174
    static_assert(alignof(T) <= ScopeStackAlignment,
272
174
                  "Cleanup's alignment is too large.");
273
174
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
174
    Cleanup *Obj = new (Buffer) T(A...);
275
174
    (void) Obj;
276
174
  }
void clang::CodeGen::EHScopeStack::pushCleanup<clang::CodeGen::CatchRetScope, llvm::CatchPadInst*>(clang::CodeGen::CleanupKind, llvm::CatchPadInst*)
Line
Count
Source
270
124
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
124
    static_assert(alignof(T) <= ScopeStackAlignment,
272
124
                  "Cleanup's alignment is too large.");
273
124
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
124
    Cleanup *Obj = new (Buffer) T(A...);
275
124
    (void) Obj;
276
124
  }
CGObjCRuntime.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallSyncExit, llvm::FunctionCallee, llvm::Value*>(clang::CodeGen::CleanupKind, llvm::FunctionCallee, llvm::Value*)
Line
Count
Source
270
7
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
7
    static_assert(alignof(T) <= ScopeStackAlignment,
272
7
                  "Cleanup's alignment is too large.");
273
7
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
7
    Cleanup *Obj = new (Buffer) T(A...);
275
7
    (void) Obj;
276
7
  }
CGOpenMPRuntime.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CleanupTy, clang::CodeGen::PrePostActionTy*>(clang::CodeGen::CleanupKind, clang::CodeGen::PrePostActionTy*)
Line
Count
Source
270
15.4k
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
15.4k
    static_assert(alignof(T) <= ScopeStackAlignment,
272
15.4k
                  "Cleanup's alignment is too large.");
273
15.4k
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
15.4k
    Cleanup *Obj = new (Buffer) T(A...);
275
15.4k
    (void) Obj;
276
15.4k
  }
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
270
16
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
16
    static_assert(alignof(T) <= ScopeStackAlignment,
272
16
                  "Cleanup's alignment is too large.");
273
16
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
16
    Cleanup *Obj = new (Buffer) T(A...);
275
16
    (void) Obj;
276
16
  }
CGOpenMPRuntime.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(clang::CodeGen::CodeGenFunction&, clang::VarDecl const*)::OMPAllocateCleanupTy, llvm::FunctionCallee, unsigned int, clang::CodeGen::Address, clang::Expr*>(clang::CodeGen::CleanupKind, llvm::FunctionCallee, unsigned int, clang::CodeGen::Address, clang::Expr*)
Line
Count
Source
270
42
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
42
    static_assert(alignof(T) <= ScopeStackAlignment,
272
42
                  "Cleanup's alignment is too large.");
273
42
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
42
    Cleanup *Obj = new (Buffer) T(A...);
275
42
    (void) Obj;
276
42
  }
CGOpenMPRuntimeGPU.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<clang::CodeGen::CGOpenMPRuntimeGPU::emitFunctionProlog(clang::CodeGen::CodeGenFunction&, clang::Decl const*)::GlobalizationScope>(clang::CodeGen::CleanupKind)
Line
Count
Source
270
11
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
11
    static_assert(alignof(T) <= ScopeStackAlignment,
272
11
                  "Cleanup's alignment is too large.");
273
11
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
11
    Cleanup *Obj = new (Buffer) T(A...);
275
11
    (void) Obj;
276
11
  }
Unexecuted instantiation: void clang::CodeGen::EHScopeStack::pushCleanup<clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::OMPAllocateCleanupTy, llvm::CallInst*>(clang::CodeGen::CleanupKind, llvm::CallInst*)
ItaniumCXXABI.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallEndCatch, bool>(clang::CodeGen::CleanupKind, bool)
Line
Count
Source
270
347
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
347
    static_assert(alignof(T) <= ScopeStackAlignment,
272
347
                  "Cleanup's alignment is too large.");
273
347
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
347
    Cleanup *Obj = new (Buffer) T(A...);
275
347
    (void) Obj;
276
347
  }
ItaniumCXXABI.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallGuardAbort, llvm::GlobalVariable*>(clang::CodeGen::CleanupKind, llvm::GlobalVariable*)
Line
Count
Source
270
170
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
170
    static_assert(alignof(T) <= ScopeStackAlignment,
272
170
                  "Cleanup's alignment is too large.");
273
170
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
170
    Cleanup *Obj = new (Buffer) T(A...);
275
170
    (void) Obj;
276
170
  }
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
270
58
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
58
    static_assert(alignof(T) <= ScopeStackAlignment,
272
58
                  "Cleanup's alignment is too large.");
273
58
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
58
    Cleanup *Obj = new (Buffer) T(A...);
275
58
    (void) Obj;
276
58
  }
MicrosoftCXXABI.cpp:void clang::CodeGen::EHScopeStack::pushCleanup<(anonymous namespace)::CallInitThreadAbort, clang::CodeGen::ConstantAddress>(clang::CodeGen::CleanupKind, clang::CodeGen::ConstantAddress)
Line
Count
Source
270
37
  template <class T, class... As> void pushCleanup(CleanupKind Kind, As... A) {
271
37
    static_assert(alignof(T) <= ScopeStackAlignment,
272
37
                  "Cleanup's alignment is too large.");
273
37
    void *Buffer = pushCleanup(Kind, sizeof(T));
274
37
    Cleanup *Obj = new (Buffer) T(A...);
275
37
    (void) Obj;
276
37
  }
277
278
  /// Push a lazily-created cleanup on the stack. Tuple version.
279
  template <class T, class... As>
280
232
  void pushCleanupTuple(CleanupKind Kind, std::tuple<As...> A) {
281
232
    static_assert(alignof(T) <= ScopeStackAlignment,
282
232
                  "Cleanup's alignment is too large.");
283
232
    void *Buffer = pushCleanup(Kind, sizeof(T));
284
232
    Cleanup *Obj = new (Buffer) T(std::move(A));
285
232
    (void) Obj;
286
232
  }
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
280
8
  void pushCleanupTuple(CleanupKind Kind, std::tuple<As...> A) {
281
8
    static_assert(alignof(T) <= ScopeStackAlignment,
282
8
                  "Cleanup's alignment is too large.");
283
8
    void *Buffer = pushCleanup(Kind, sizeof(T));
284
8
    Cleanup *Obj = new (Buffer) T(std::move(A));
285
8
    (void) Obj;
286
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
280
78
  void pushCleanupTuple(CleanupKind Kind, std::tuple<As...> A) {
281
78
    static_assert(alignof(T) <= ScopeStackAlignment,
282
78
                  "Cleanup's alignment is too large.");
283
78
    void *Buffer = pushCleanup(Kind, sizeof(T));
284
78
    Cleanup *Obj = new (Buffer) T(std::move(A));
285
78
    (void) Obj;
286
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
280
120
  void pushCleanupTuple(CleanupKind Kind, std::tuple<As...> A) {
281
120
    static_assert(alignof(T) <= ScopeStackAlignment,
282
120
                  "Cleanup's alignment is too large.");
283
120
    void *Buffer = pushCleanup(Kind, sizeof(T));
284
120
    Cleanup *Obj = new (Buffer) T(std::move(A));
285
120
    (void) Obj;
286
120
  }
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
280
13
  void pushCleanupTuple(CleanupKind Kind, std::tuple<As...> A) {
281
13
    static_assert(alignof(T) <= ScopeStackAlignment,
282
13
                  "Cleanup's alignment is too large.");
283
13
    void *Buffer = pushCleanup(Kind, sizeof(T));
284
13
    Cleanup *Obj = new (Buffer) T(std::move(A));
285
13
    (void) Obj;
286
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
280
13
  void pushCleanupTuple(CleanupKind Kind, std::tuple<As...> A) {
281
13
    static_assert(alignof(T) <= ScopeStackAlignment,
282
13
                  "Cleanup's alignment is too large.");
283
13
    void *Buffer = pushCleanup(Kind, sizeof(T));
284
13
    Cleanup *Obj = new (Buffer) T(std::move(A));
285
13
    (void) Obj;
286
13
  }
287
288
  // Feel free to add more variants of the following:
289
290
  /// Push a cleanup with non-constant storage requirements on the
291
  /// stack.  The cleanup type must provide an additional static method:
292
  ///   static size_t getExtraSize(size_t);
293
  /// The argument to this method will be the value N, which will also
294
  /// be passed as the first argument to the constructor.
295
  ///
296
  /// The data stored in the extra storage must obey the same
297
  /// restrictions as normal cleanup member data.
298
  ///
299
  /// The pointer returned from this method is valid until the cleanup
300
  /// stack is modified.
301
  template <class T, class... As>
302
802
  T *pushCleanupWithExtra(CleanupKind Kind, size_t N, As... A) {
303
802
    static_assert(alignof(T) <= ScopeStackAlignment,
304
802
                  "Cleanup's alignment is too large.");
305
802
    void *Buffer = pushCleanup(Kind, sizeof(T) + T::getExtraSize(N));
306
802
    return new (Buffer) T(N, A...);
307
802
  }
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
302
796
  T *pushCleanupWithExtra(CleanupKind Kind, size_t N, As... A) {
303
796
    static_assert(alignof(T) <= ScopeStackAlignment,
304
796
                  "Cleanup's alignment is too large.");
305
796
    void *Buffer = pushCleanup(Kind, sizeof(T) + T::getExtraSize(N));
306
796
    return new (Buffer) T(N, A...);
307
796
  }
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
302
6
  T *pushCleanupWithExtra(CleanupKind Kind, size_t N, As... A) {
303
6
    static_assert(alignof(T) <= ScopeStackAlignment,
304
6
                  "Cleanup's alignment is too large.");
305
6
    void *Buffer = pushCleanup(Kind, sizeof(T) + T::getExtraSize(N));
306
6
    return new (Buffer) T(N, A...);
307
6
  }
308
309
543
  void pushCopyOfCleanup(CleanupKind Kind, const void *Cleanup, size_t Size) {
310
543
    void *Buffer = pushCleanup(Kind, Size);
311
543
    std::memcpy(Buffer, Cleanup, Size);
312
543
  }
313
314
  /// Pops a cleanup scope off the stack.  This is private to CGCleanup.cpp.
315
  void popCleanup();
316
317
  /// Push a set of catch handlers on the stack.  The catch is
318
  /// uninitialized and will need to have the given number of handlers
319
  /// set on it.
320
  class EHCatchScope *pushCatch(unsigned NumHandlers);
321
322
  /// Pops a catch scope off the stack.  This is private to CGException.cpp.
323
  void popCatch();
324
325
  /// Push an exceptions filter on the stack.
326
  class EHFilterScope *pushFilter(unsigned NumFilters);
327
328
  /// Pops an exceptions filter off the stack.
329
  void popFilter();
330
331
  /// Push a terminate handler on the stack.
332
  void pushTerminate();
333
334
  /// Pops a terminate handler off the stack.
335
  void popTerminate();
336
337
  // Returns true iff the current scope is either empty or contains only
338
  // lifetime markers, i.e. no real cleanup code
339
  bool containsOnlyLifetimeMarkers(stable_iterator Old) const;
340
341
  /// Determines whether the exception-scopes stack is empty.
342
544k
  bool empty() const { return StartOfData == EndOfBuffer; }
343
344
  bool requiresLandingPad() const;
345
346
  /// Determines whether there are any normal cleanups on the stack.
347
53.9k
  bool hasNormalCleanups() const {
348
53.9k
    return InnermostNormalCleanup != stable_end();
349
53.9k
  }
350
351
  /// Returns the innermost normal cleanup on the stack, or
352
  /// stable_end() if there are no normal cleanups.
353
532k
  stable_iterator getInnermostNormalCleanup() const {
354
532k
    return InnermostNormalCleanup;
355
532k
  }
356
  stable_iterator getInnermostActiveNormalCleanup() const;
357
358
275k
  stable_iterator getInnermostEHScope() const {
359
275k
    return InnermostEHScope;
360
275k
  }
361
362
363
  /// An unstable reference to a scope-stack depth.  Invalidated by
364
  /// pushes but not pops.
365
  class iterator;
366
367
  /// Returns an iterator pointing to the innermost EH scope.
368
  iterator begin() const;
369
370
  /// Returns an iterator pointing to the outermost EH scope.
371
  iterator end() const;
372
373
  /// Create a stable reference to the top of the EH stack.  The
374
  /// returned reference is valid until that scope is popped off the
375
  /// stack.
376
2.78M
  stable_iterator stable_begin() const {
377
2.78M
    return stable_iterator(EndOfBuffer - StartOfData);
378
2.78M
  }
379
380
  /// Create a stable reference to the bottom of the EH stack.
381
1.68M
  static stable_iterator stable_end() {
382
1.68M
    return stable_iterator(0);
383
1.68M
  }
384
385
  /// Translates an iterator into a stable_iterator.
386
  stable_iterator stabilize(iterator it) const;
387
388
  /// Turn a stable reference to a scope depth into a unstable pointer
389
  /// to the EH stack.
390
  iterator find(stable_iterator save) const;
391
392
  /// Add a branch fixup to the current cleanup scope.
393
3.00k
  BranchFixup &addBranchFixup() {
394
3.00k
    assert(hasNormalCleanups() && "adding fixup in scope without cleanups");
395
3.00k
    BranchFixups.push_back(BranchFixup());
396
3.00k
    return BranchFixups.back();
397
3.00k
  }
398
399
148k
  unsigned getNumBranchFixups() const { return BranchFixups.size(); }
400
3.02k
  BranchFixup &getBranchFixup(unsigned I) {
401
3.02k
    assert(I < getNumBranchFixups());
402
3.02k
    return BranchFixups[I];
403
3.02k
  }
404
405
  /// Pops lazily-removed fixups from the end of the list.  This
406
  /// should only be called by procedures which have just popped a
407
  /// cleanup or resolved one or more fixups.
408
  void popNullFixups();
409
410
  /// Clears the branch-fixups list.  This should only be called by
411
  /// ResolveAllBranchFixups.
412
4
  void clearFixups() { BranchFixups.clear(); }
413
};
414
415
} // namespace CodeGen
416
} // namespace clang
417
418
#endif