14#ifndef CLANG_LIB_CIR_CODEGEN_CIRGENCLEANUP_H
15#define CLANG_LIB_CIR_CODEGEN_CIRGENCLEANUP_H
19#include "mlir/IR/Value.h"
25 class CommonBitFields {
29 enum { NumCommonBits = 3 };
37 unsigned isNormalCleanup : 1;
40 unsigned isEHCleanup : 1;
43 unsigned isActive : 1;
46 unsigned isLifetimeMarker : 1;
49 unsigned testFlagInNormalCleanup : 1;
52 unsigned testFlagInEHCleanup : 1;
56 unsigned cleanupSize : 12;
97 assert(
cleanupBits.cleanupSize == cleanupSize &&
"cleanup size overflow");
127 explicit iterator(
char *ptr) : ptr(ptr) {}
A cleanup scope which generates the cleanup blocks lazily.
size_t getAllocatedSize() const
EHScopeStack::Cleanup * getCleanup()
size_t getCleanupSize() const
static bool classof(const EHScope *scope)
static size_t getSizeForCleanupSize(size_t size)
Gets the size required for a lazy cleanup scope with the given cleanup-data requirements.
bool isNormalCleanup() const
void * getCleanupBuffer()
EHCleanupScope(unsigned cleanupSize)
Information for lazily generating a cleanup.
A non-stable pointer into the scope stack.
EHScope & operator*() const
A stack of scopes which respond to exceptions, including cleanups and catch blocks.
iterator begin() const
Returns an iterator pointing to the innermost EH scope.
A protected scope for zero-cost EH handling.
CleanupBitFields cleanupBits
CommonBitFields commonBits