mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +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:
@@ -483,7 +483,7 @@ void llvm::AddCatchInfo(const CallInst &I, MachineModuleInfo *MMI,
|
||||
|
||||
// Gather all the type infos for this landing pad and pass them along to
|
||||
// MachineModuleInfo.
|
||||
std::vector<const GlobalVariable *> TyInfo;
|
||||
std::vector<const GlobalValue *> TyInfo;
|
||||
unsigned N = I.getNumArgOperands();
|
||||
|
||||
for (unsigned i = N - 1; i > 1; --i) {
|
||||
@@ -541,14 +541,14 @@ void llvm::AddLandingPadInfo(const LandingPadInst &I, MachineModuleInfo &MMI,
|
||||
Value *Val = I.getClause(i - 1);
|
||||
if (I.isCatch(i - 1)) {
|
||||
MMI.addCatchTypeInfo(MBB,
|
||||
dyn_cast<GlobalVariable>(Val->stripPointerCasts()));
|
||||
dyn_cast<GlobalValue>(Val->stripPointerCasts()));
|
||||
} else {
|
||||
// Add filters in a list.
|
||||
Constant *CVal = cast<Constant>(Val);
|
||||
SmallVector<const GlobalVariable*, 4> FilterList;
|
||||
SmallVector<const GlobalValue*, 4> FilterList;
|
||||
for (User::op_iterator
|
||||
II = CVal->op_begin(), IE = CVal->op_end(); II != IE; ++II)
|
||||
FilterList.push_back(cast<GlobalVariable>((*II)->stripPointerCasts()));
|
||||
FilterList.push_back(cast<GlobalValue>((*II)->stripPointerCasts()));
|
||||
|
||||
MMI.addFilterTypeInfo(MBB, FilterList);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user