35 while (StateBB != StateE) {
41 if (!isa<ReturnInst>(TI) && !isa<ResumeInst>(TI))
50 if (!HandleExceptions)
60 if (
CallInst *CI = dyn_cast<CallInst>(&II))
61 if (!CI->doesNotThrow())
72 if (!F.hasPersonalityFn()) {
74 F.setPersonalityFn(PersFn);
89 for (
unsigned I = Calls.
size();
I != 0;) {
90 CallInst *CI = cast<CallInst>(Calls[--
I]);
void push_back(const T &Elt)
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
A Module instance is used to store all the information related to an LLVM module. ...
static ResumeInst * Create(Value *Exn, Instruction *InsertBefore=nullptr)
This class represents a function call, abstracting a target machine's calling convention.
const std::string & getTargetTriple() const
Get the target triple which is a string describing the target host.
static LandingPadInst * Create(Type *RetTy, unsigned NumReservedClauses, const Twine &NameStr="", Instruction *InsertBefore=nullptr)
Constructors - NumReservedClauses is a hint for the number of incoming clauses that this landingpad w...
bool doesNotThrow() const
Determine if the function cannot unwind.
This provides a uniform API for creating instructions and inserting them into a basic block: either a...
LLVM_NODISCARD bool empty() const
void setCleanup(bool V)
Indicate that this landingpad instruction is a cleanup.
static FunctionType * get(Type *Result, ArrayRef< Type * > Params, bool isVarArg)
This static method is the primary way of constructing a FunctionType.
static Constant * getDefaultPersonalityFn(Module *M)
void SetInsertPoint(BasicBlock *TheBB)
This specifies that created instructions should be appended to the end of the specified block...
The landingpad instruction holds all of the information necessary to generate correct exception handl...
Subclasses of this class are all able to terminate a basic block.
Constant * getOrInsertFunction(StringRef Name, FunctionType *T, AttributeSet AttributeList)
Look up the specified function in the module symbol table.
LLVM Basic Block Representation.
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important class for using LLVM in a threaded context.
This is an important base class in LLVM.
Resume the propagation of an exception.
EHPersonality classifyEHPersonality(const Value *Pers)
See if the given exception handling personality function is one that we understand.
static BasicBlock * Create(LLVMContext &Context, const Twine &Name="", Function *Parent=nullptr, BasicBlock *InsertBefore=nullptr)
Creates a new BasicBlock.
EHPersonality getDefaultEHPersonality(const Triple &T)
static PointerType * getInt8PtrTy(LLVMContext &C, unsigned AS=0)
Triple - Helper class for working with autoconf configuration names.
static StructType * get(LLVMContext &Context, ArrayRef< Type * > Elements, bool isPacked=false)
This static method is the primary way to create a literal StructType.
bool isFuncletEHPersonality(EHPersonality Pers)
Returns true if this is a personality function that invokes handler funclets (which must return to it...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Module.h This file contains the declarations for the Module class.
static GCRegistry::Add< ShadowStackGC > C("shadow-stack","Very portable GC for uncooperative code generators")
static IntegerType * getInt32Ty(LLVMContext &C)
TerminatorInst * getTerminator()
Returns the terminator instruction if the block is well formed or null if the block is not well forme...
LLVM_ATTRIBUTE_ALWAYS_INLINE size_type size() const
StringRef getEHPersonalityName(EHPersonality Pers)
BasicBlock * changeToInvokeAndSplitBasicBlock(CallInst *CI, BasicBlock *UnwindEdge)
Convert the CallInst to InvokeInst with the specified unwind edge basic block.
LLVMContext & getContext() const
Get the global data context.