mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +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:
@ -1165,6 +1165,23 @@ static void WriteInstruction(const Instruction &I, unsigned InstID,
|
||||
break;
|
||||
}
|
||||
|
||||
case Instruction::LandingPad: {
|
||||
const LandingPadInst &LP = cast<LandingPadInst>(I);
|
||||
Code = bitc::FUNC_CODE_INST_LANDINGPAD;
|
||||
Vals.push_back(VE.getTypeID(LP.getType()));
|
||||
PushValueAndType(LP.getPersonalityFn(), InstID, Vals, VE);
|
||||
Vals.push_back(LP.isCleanup());
|
||||
Vals.push_back(LP.getNumClauses());
|
||||
for (unsigned I = 0, E = LP.getNumClauses(); I != E; ++I) {
|
||||
if (LP.isCatch(I))
|
||||
Vals.push_back(LandingPadInst::Catch);
|
||||
else
|
||||
Vals.push_back(LandingPadInst::Filter);
|
||||
PushValueAndType(LP.getClause(I), InstID, Vals, VE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case Instruction::Alloca:
|
||||
Code = bitc::FUNC_CODE_INST_ALLOCA;
|
||||
Vals.push_back(VE.getTypeID(I.getType()));
|
||||
|
Reference in New Issue
Block a user