mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-28 06:24:57 +00:00
Merge the contents from exception-handling-rewrite to the mainline.
This adds the new instructions 'landingpad' and 'resume'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136253 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1126,6 +1126,10 @@ static void WriteInstruction(const Instruction &I, unsigned InstID,
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Instruction::Resume:
|
||||
Code = bitc::FUNC_CODE_INST_RESUME;
|
||||
PushValueAndType(I.getOperand(0), InstID, Vals, VE);
|
||||
break;
|
||||
case Instruction::Unwind:
|
||||
Code = bitc::FUNC_CODE_INST_UNWIND;
|
||||
break;
|
||||
@ -1145,6 +1149,20 @@ 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) {
|
||||
Vals.push_back(LP.getClauseType(I));
|
||||
PushValueAndType(LP.getClauseValue(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