Lines Matching refs:Cleanup
1 //===-- EHScopeStack.h - Stack for cleanup IR generation --------*- C++ -*-===//
34 /// the innermost cleanup. When a (normal) cleanup is popped, any
35 /// unresolved fixups in that scope are threaded through the cleanup.
78 /// Denotes a cleanup that should run when a scope is exited using exceptional
82 /// Denotes a cleanup that should run when a scope is exited using normal
134 /// Information for lazily generating a cleanup. Subclasses must be
136 /// allocated on the cleanup stack and freely copied and moved
139 /// Cleanup implementations should generally be declared in an
141 class Cleanup {
146 ~Cleanup() = default;
149 Cleanup(const Cleanup &) = default;
150 Cleanup(Cleanup &&) {}
151 Cleanup() = default;
168 /// isForEH - true if the current emission is for an EH cleanup.
176 /// isEHCleanupKind - true if the cleanup was pushed as an EH
177 /// cleanup.
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
190 // \param flags cleanup kind.
195 /// then restores them and performs the cleanup.
197 class ConditionalCleanup final : public Cleanup {
235 /// The innermost normal cleanup on the stack.
246 /// know the EH stack depth. Whenever we pop a cleanup, we have
251 /// When popping out of a cleanup, these uses are threaded through
252 /// the cleanup and adjusted to point to the new cleanup.
275 /// Push a lazily-created cleanup on the stack.
278 "Cleanup's alignment is too large.");
280 Cleanup *Obj = new (Buffer) T(A...);
284 /// Push a lazily-created cleanup on the stack. Tuple version.
288 "Cleanup's alignment is too large.");
290 Cleanup *Obj = new (Buffer) T(std::move(A));
296 /// Push a cleanup with non-constant storage requirements on the
297 /// stack. The cleanup type must provide an additional static method:
303 /// restrictions as normal cleanup member data.
305 /// The pointer returned from this method is valid until the cleanup
310 "Cleanup's alignment is too large.");
315 void pushCopyOfCleanup(CleanupKind Kind, const void *Cleanup, size_t Size) {
317 std::memcpy(Buffer, Cleanup, Size);
322 /// Pops a cleanup scope off the stack. This is private to CGCleanup.cpp.
346 // lifetime markers, i.e. no real cleanup code
359 /// Returns the innermost normal cleanup on the stack, or
400 /// Add a branch fixup to the current cleanup scope.
415 /// cleanup or resolved one or more fixups.