mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
Allow the use of functions as typeinfo in landingpad clauses
This is one step towards supporting SEH filter functions in LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221954 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -427,7 +427,7 @@ void MachineModuleInfo::addPersonality(MachineBasicBlock *LandingPad,
|
||||
///
|
||||
void MachineModuleInfo::
|
||||
addCatchTypeInfo(MachineBasicBlock *LandingPad,
|
||||
ArrayRef<const GlobalVariable *> TyInfo) {
|
||||
ArrayRef<const GlobalValue *> TyInfo) {
|
||||
LandingPadInfo &LP = getOrCreateLandingPadInfo(LandingPad);
|
||||
for (unsigned N = TyInfo.size(); N; --N)
|
||||
LP.TypeIds.push_back(getTypeIDFor(TyInfo[N - 1]));
|
||||
@ -437,7 +437,7 @@ addCatchTypeInfo(MachineBasicBlock *LandingPad,
|
||||
///
|
||||
void MachineModuleInfo::
|
||||
addFilterTypeInfo(MachineBasicBlock *LandingPad,
|
||||
ArrayRef<const GlobalVariable *> TyInfo) {
|
||||
ArrayRef<const GlobalValue *> TyInfo) {
|
||||
LandingPadInfo &LP = getOrCreateLandingPadInfo(LandingPad);
|
||||
std::vector<unsigned> IdsInFilter(TyInfo.size());
|
||||
for (unsigned I = 0, E = TyInfo.size(); I != E; ++I)
|
||||
@ -506,7 +506,7 @@ void MachineModuleInfo::setCallSiteLandingPad(MCSymbol *Sym,
|
||||
|
||||
/// getTypeIDFor - Return the type id for the specified typeinfo. This is
|
||||
/// function wide.
|
||||
unsigned MachineModuleInfo::getTypeIDFor(const GlobalVariable *TI) {
|
||||
unsigned MachineModuleInfo::getTypeIDFor(const GlobalValue *TI) {
|
||||
for (unsigned i = 0, N = TypeInfos.size(); i != N; ++i)
|
||||
if (TypeInfos[i] == TI) return i + 1;
|
||||
|
||||
|
Reference in New Issue
Block a user