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())
71 if (!F.hasPersonalityFn()) {
73 F.setPersonalityFn(PersFn);
88 for (
unsigned I = Calls.
size();
I != 0;) {
89 CallInst *CI = cast<CallInst>(Calls[--
I]);
const std::string & getTargetTriple() const
Get the target triple which is a string describing the target host.
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
This class represents lattice values for constants.
Constant * getOrInsertFunction(StringRef Name, FunctionType *T, AttributeList AttributeList)
Look up the specified function in the module symbol table.
A Module instance is used to store all the information related to an LLVM module. ...
static ResumeInst * Create(Value *Exn, Instruction *InsertBefore=nullptr)
void push_back(const T &Elt)
This class represents a function call, abstracting a target machine's calling convention.
LLVMContext & getContext() const
All values hold a context through their type.
const Instruction * getTerminator() const LLVM_READONLY
Returns the terminator instruction if the block is well formed or null if the block is not well forme...
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...
LLVMContext & getContext() const
Get the global data context.
This provides a uniform API for creating instructions and inserting them into a basic block: either a...
static StructType * get(LLVMContext &Context, ArrayRef< Type *> Elements, bool isPacked=false)
This static method is the primary way to create a literal StructType.
bool isScopedEHPersonality(EHPersonality Pers)
Returns true if this personality uses scope-style EH IR instructions: catchswitch, catchpad/ret, and cleanuppad/ret.
void setCleanup(bool V)
Indicate that this landingpad instruction is a cleanup.
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...
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 FunctionType * get(Type *Result, ArrayRef< Type *> Params, bool isVarArg)
This static method is the primary way of constructing a FunctionType.
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.
bool doesNotThrow() const
Determine if the function cannot unwind.
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 IntegerType * getInt32Ty(LLVMContext &C)
LLVM_NODISCARD bool empty() const
StringRef getEHPersonalityName(EHPersonality Pers)
BasicBlock * changeToInvokeAndSplitBasicBlock(CallInst *CI, BasicBlock *UnwindEdge)
Convert the CallInst to InvokeInst with the specified unwind edge basic block.
constexpr char Args[]
Key for Kernel::Metadata::mArgs.