LLVM 20.0.0git
|
EscapeEnumerator - This is a little algorithm to find all escape points from a function so that "finally"-style code can be inserted. More...
#include "llvm/Transforms/Utils/EscapeEnumerator.h"
Public Member Functions | |
EscapeEnumerator (Function &F, const char *N="cleanup", bool HandleExceptions=true, DomTreeUpdater *DTU=nullptr) | |
IRBuilder * | Next () |
EscapeEnumerator - This is a little algorithm to find all escape points from a function so that "finally"-style code can be inserted.
In addition to finding the existing return and unwind instructions, it also (if necessary) transforms any call instructions into invokes and sends them to a landing pad.
Definition at line 29 of file EscapeEnumerator.h.
|
inline |
Definition at line 41 of file EscapeEnumerator.h.
References F.
IRBuilder * EscapeEnumerator::Next | ( | ) |
Definition at line 30 of file EscapeEnumerator.cpp.
References llvm::CallingConv::C, llvm::changeToInvokeAndSplitBasicBlock(), llvm::classifyEHPersonality(), llvm::BasicBlock::Create(), llvm::LandingPadInst::Create(), llvm::ResumeInst::Create(), llvm::Function::doesNotThrow(), llvm::SmallVectorBase< Size_T >::empty(), F, llvm::StructType::get(), llvm::FunctionCallee::getCallee(), getDefaultPersonalityFn(), llvm::Type::getInt32Ty(), llvm::BasicBlock::getTerminatingMustTailCall(), llvm::BasicBlock::getTerminator(), llvm::PointerType::getUnqual(), I, II, llvm::isScopedEHPersonality(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::report_fatal_error(), llvm::LandingPadInst::setCleanup(), llvm::IRBuilderBase::SetInsertPoint(), and llvm::SmallVectorBase< Size_T >::size().