llvm::BasicBlock *CachedLandingPad;
51llvm::BasicBlock *CachedEHDispatchBlock;
55 classCommonBitFields {
57LLVM_PREFERRED_TYPE(
Kind)
60 enum{ NumCommonBits = 3 };
67 unsignedNumHandlers : 32 - NumCommonBits;
75LLVM_PREFERRED_TYPE(
bool)
76 unsignedIsNormalCleanup : 1;
79LLVM_PREFERRED_TYPE(
bool)
80 unsignedIsEHCleanup : 1;
83LLVM_PREFERRED_TYPE(
bool)
84 unsignedIsActive : 1;
87LLVM_PREFERRED_TYPE(
bool)
88 unsignedIsLifetimeMarker : 1;
91LLVM_PREFERRED_TYPE(
bool)
92 unsignedIsFakeUse : 1;
95LLVM_PREFERRED_TYPE(
bool)
96 unsignedTestFlagInNormalCleanup : 1;
99LLVM_PREFERRED_TYPE(
bool)
100 unsignedTestFlagInEHCleanup : 1;
104 unsignedCleanupSize : 12;
111 unsignedNumFilters : 32 - NumCommonBits;
123: CachedLandingPad(nullptr), CachedEHDispatchBlock(nullptr),
124EnclosingEHScope(enclosingEHScope) {
131 returnCachedLandingPad;
135CachedLandingPad = block;
139 returnCachedEHDispatchBlock;
143CachedEHDispatchBlock = block;
148 return!block->use_empty();
153 returnEnclosingEHScope;
184 return reinterpret_cast<Handler*
>(
this+1);
187 constHandler *getHandlers()
const{
188 return reinterpret_cast<constHandler*
>(
this+1);
200assert(
CatchBits.NumHandlers == numHandlers &&
"NumHandlers overflow?");
225 returngetHandlers()[I];
256llvm::BasicBlock *NormalBlock;
274 mutable structExtInfo *ExtInfo;
279 structAuxillaryAllocas {
284 voidAdd(llvm::AllocaInst *Alloca) { AuxAllocas.push_back(Alloca); }
292~AuxillaryAllocas() {
295llvm::SetVector<llvm::Instruction *> Uses;
296 for(
auto*Inst : llvm::reverse(AuxAllocas))
297CollectUses(Inst, Uses);
299 for(
auto*I : llvm::reverse(Uses))
300I->eraseFromParent();
304 voidCollectUses(llvm::Instruction *I,
305llvm::SetVector<llvm::Instruction *> &Uses) {
306 if(!I || !Uses.insert(I))
308 for(
auto*User : I->users())
309CollectUses(cast<llvm::Instruction>(User), Uses);
312 mutable structAuxillaryAllocas *AuxAllocas;
314AuxillaryAllocas &getAuxillaryAllocas() {
316AuxAllocas =
new structAuxillaryAllocas();
326 structExtInfo &getExtInfo() {
327 if(!ExtInfo) ExtInfo =
new structExtInfo();
331 const structExtInfo &getExtInfo()
const{
332 if(!ExtInfo) ExtInfo =
new structExtInfo();
352EnclosingNormal(enclosingNormal), NormalBlock(nullptr),
353ActiveFlag(
Address::invalid()), ExtInfo(nullptr), AuxAllocas(nullptr),
354FixupDepth(fixupDepth) {
364assert(
CleanupBits.CleanupSize == cleanupSize &&
"cleanup size overflow");
373 for(
auto*Alloca : Allocas)
374getAuxillaryAllocas().Add(Alloca);
420 returnEnclosingNormal;
431 bool hasBranches()
const{
returnExtInfo && !ExtInfo->Branches.empty(); }
445llvm::BasicBlock *
Block) {
446 structExtInfo &ExtInfo = getExtInfo();
447 if(ExtInfo.Branches.insert(
Block).second)
448ExtInfo.BranchAfters.push_back(std::make_pair(
Block, Index));
453 returnExtInfo ? ExtInfo->BranchAfters.size() : 0;
458 returnExtInfo->BranchAfters[I].first;
463 returnExtInfo->BranchAfters[I].second;
482 returngetExtInfo().Branches.insert(
Block).second;
487 if(!ExtInfo)
return false;
488 return(ExtInfo->BranchAfters.size() != ExtInfo->Branches.size());
502 "EHCleanupScope expected alignment");
513llvm::Value **getFilters() {
514 return reinterpret_cast<llvm::Value**
>(
this+1);
517llvm::Value *
const*getFilters()
const{
518 return reinterpret_cast<llvm::Value*
const*
>(
this+1);
525assert(
FilterBits.NumFilters == numFilters &&
"NumFilters overflow");
529 return sizeof(
EHFilterScope) + numFilters *
sizeof(llvm::Value*);
534 void setFilter(
unsignedi, llvm::Value *filterValue) {
536getFilters()[i] = filterValue;
541 returngetFilters()[i];
567 explicit iterator(
char*Ptr) : Ptr(Ptr) {}
573 return reinterpret_cast<EHScope*
>(Ptr);
632assert(!
empty() &&
"popping exception stack when not empty");
640assert(!
empty() &&
"popping exception stack when not empty");
648assert(sp.
isValid() &&
"finding invalid savepoint");
649assert(sp.Size <=
stable_begin().Size &&
"finding savepoint after pop");
650 return iterator(EndOfBuffer - sp.Size);
655assert(StartOfData <= ir.Ptr && ir.Ptr <= EndOfBuffer);
enum clang::sema::@1704::IndirectLocalPathEntry::EntryKind Kind
static Decl::Kind getKind(const Decl *D)
bool isOne() const
isOne - Test whether the quantity equals one.
Like RawAddress, an abstract representation of an aligned address, but the pointer contained in this ...
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...
This class organizes the cross-function state that is used while generating LLVM code.
A scope which attempts to handle some, possibly all, types of exceptions.
EHCatchScope(unsigned numHandlers, EHScopeStack::stable_iterator enclosingEHScope)
const Handler & getHandler(unsigned I) const
void setHandler(unsigned I, llvm::Constant *Type, llvm::BasicBlock *Block)
static size_t getSizeForNumHandlers(unsigned N)
void setHandler(unsigned I, CatchTypeInfo Type, llvm::BasicBlock *Block)
void setCatchAllHandler(unsigned I, llvm::BasicBlock *Block)
void clearHandlerBlocks()
static bool classof(const EHScope *Scope)
unsigned getNumHandlers() const
A cleanup scope which generates the cleanup blocks lazily.
bool shouldTestFlagInEHCleanup() const
bool isLifetimeMarker() const
Address getActiveFlag() const
EHScopeStack::stable_iterator getEnclosingNormalCleanup() const
size_t getAllocatedSize() const
bool hasActiveFlag() const
void setNormalBlock(llvm::BasicBlock *BB)
llvm::ConstantInt * getBranchAfterIndex(unsigned I) const
bool shouldTestFlagInNormalCleanup() const
bool addBranchThrough(llvm::BasicBlock *Block)
Add a branch-through to this cleanup scope.
llvm::BasicBlock * getBranchAfterBlock(unsigned I) const
void AddAuxAllocas(llvm::SmallVector< llvm::AllocaInst * > Allocas)
void setTestFlagInNormalCleanup()
void setTestFlagInEHCleanup()
void * getCleanupBuffer()
unsigned getNumBranchAfters() const
Return the number of unique branch-afters on this scope.
bool isNormalCleanup() const
static size_t getSizeForCleanupSize(size_t Size)
Gets the size required for a lazy cleanup scope with the given cleanup-data requirements.
bool hasBranches() const
True if this cleanup scope has any branch-afters or branch-throughs.
void addBranchAfter(llvm::ConstantInt *Index, llvm::BasicBlock *Block)
Add a branch-after to this cleanup scope.
void setActiveFlag(RawAddress Var)
EHCleanupScope(bool isNormal, bool isEH, unsigned cleanupSize, unsigned fixupDepth, EHScopeStack::stable_iterator enclosingNormal, EHScopeStack::stable_iterator enclosingEH)
EHScopeStack::Cleanup * getCleanup()
unsigned getFixupDepth() const
size_t getCleanupSize() const
static bool classof(const EHScope *Scope)
llvm::BasicBlock * getNormalBlock() const
bool hasBranchThroughs() const
Determines if this cleanup scope has any branch throughs.
An exceptions scope which filters exceptions thrown through it.
void setFilter(unsigned i, llvm::Value *filterValue)
static size_t getSizeForNumFilters(unsigned numFilters)
EHFilterScope(unsigned numFilters)
llvm::Value * getFilter(unsigned i) const
unsigned getNumFilters() const
static bool classof(const EHScope *scope)
Information for lazily generating a cleanup.
A non-stable pointer into the scope stack.
bool operator!=(iterator other) const
EHScope & operator*() const
bool encloses(iterator other) const
bool strictlyEncloses(iterator other) const
EHScope * operator->() const
bool operator==(iterator other) const
A saved depth on the scope stack.
A stack of scopes which respond to exceptions, including cleanups and catch blocks.
stable_iterator stable_begin() const
Create a stable reference to the top of the EH stack.
bool empty() const
Determines whether the exception-scopes stack is empty.
iterator end() const
Returns an iterator pointing to the outermost EH scope.
iterator begin() const
Returns an iterator pointing to the innermost EH scope.
void popCatch()
Pops a catch scope off the stack. This is private to CGException.cpp.
iterator find(stable_iterator save) const
Turn a stable reference to a scope depth into a unstable pointer to the EH stack.
stable_iterator stabilize(iterator it) const
Translates an iterator into a stable_iterator.
void popTerminate()
Pops a terminate handler off the stack.
A protected scope for zero-cost EH handling.
llvm::BasicBlock * getCachedLandingPad() const
EHScope(Kind kind, EHScopeStack::stable_iterator enclosingEHScope)
void setCachedLandingPad(llvm::BasicBlock *block)
CleanupBitFields CleanupBits
FilterBitFields FilterBits
EHScopeStack::stable_iterator getEnclosingEHScope() const
llvm::BasicBlock * getCachedEHDispatchBlock() const
void setCachedEHDispatchBlock(llvm::BasicBlock *block)
bool hasEHBranches() const
CommonBitFields CommonBits
An exceptions scope which calls std::terminate if any exception reaches it.
EHTerminateScope(EHScopeStack::stable_iterator enclosingEHScope)
static bool classof(const EHScope *scope)
An abstract representation of an aligned address.
CharUnits getAlignment() const
Return the alignment of this pointer.
Represents a function declaration or definition.
Scope - A scope is a transient data structure that is used while parsing the program.
The base class of the type hierarchy.
@ Type
The l-value was considered opaque, so the alignment was determined from a type.
The JSON file list parser is used to communicate input to InstallAPI.
Diagnostic wrappers for TextAPI types for error reporting.
The MS C++ ABI needs a pointer to RTTI data plus some flags to describe the type of a catch handler,...
CatchTypeInfo Type
A type info value, or null (C++ null, not an LLVM null pointer) for a catch-all.
llvm::BasicBlock * Block
The catch handler for this type.
The exceptions personality for a function.
bool isMSVCXXPersonality() const
static const EHPersonality & get(CodeGenModule &CGM, const FunctionDecl *FD)
static const EHPersonality XL_CPlusPlus
static const EHPersonality GNU_ObjC_SJLJ
bool isWasmPersonality() const
static const EHPersonality ZOS_CPlusPlus
static const EHPersonality GNUstep_ObjC
static const EHPersonality MSVC_CxxFrameHandler3
bool usesFuncletPads() const
Does this personality use landingpads or the family of pad instructions designed to form funclets?
static const EHPersonality MSVC_C_specific_handler
static const EHPersonality GNU_CPlusPlus_SEH
static const EHPersonality GNU_ObjC
static const EHPersonality GNU_CPlusPlus_SJLJ
static const EHPersonality GNU_C_SJLJ
static const EHPersonality GNU_C
static const EHPersonality NeXT_ObjC
const char * CatchallRethrowFn
static const EHPersonality GNU_CPlusPlus
static const EHPersonality GNU_ObjCXX
bool isMSVCPersonality() const
static const EHPersonality GNU_C_SEH
static const EHPersonality MSVC_except_handler
static const EHPersonality GNU_ObjC_SEH
const char * PersonalityFn
static const EHPersonality GNU_Wasm_CPlusPlus
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4