mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-25 17:20:48 +00:00
Initial commit of the 'landingpad' instruction.
This implements the 'landingpad' instruction. It's used to indicate that a basic block is a landing pad. There are several restrictions on its use (see LangRef.html for more detail). These restrictions allow the exception handling code to gather the information it needs in a much more sane way. This patch has the definition, implementation, C interface, parsing, and bitcode support in it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137501 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -348,3 +348,15 @@ void BasicBlock::replaceSuccessorsPhiUsesWith(BasicBlock *New) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// isLandingPad - Return true if this basic block is a landing pad. I.e., it's
|
||||
/// the destination of the 'unwind' edge of an invoke instruction.
|
||||
bool BasicBlock::isLandingPad() const {
|
||||
return isa<LandingPadInst>(getFirstNonPHI());
|
||||
}
|
||||
|
||||
/// getLandingPadInst() - Return the landingpad instruction associated with
|
||||
/// the landing pad.
|
||||
LandingPadInst *BasicBlock::getLandingPadInst() {
|
||||
return dyn_cast<LandingPadInst>(getFirstNonPHI());
|
||||
}
|
||||
|
Reference in New Issue
Block a user