From 283bc2ed28f423c29ab57a2b491d2ebdb53a4b12 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 14 Nov 2014 00:35:50 +0000 Subject: Allow the use of functions as typeinfo in landingpad clauses This is one step towards supporting SEH filter functions in LLVM. llvm-svn: 221954 --- llvm/lib/CodeGen/MachineModuleInfo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp') diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp index 4117b17..eb3c0bf 100644 --- a/llvm/lib/CodeGen/MachineModuleInfo.cpp +++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp @@ -427,7 +427,7 @@ void MachineModuleInfo::addPersonality(MachineBasicBlock *LandingPad, /// void MachineModuleInfo:: addCatchTypeInfo(MachineBasicBlock *LandingPad, - ArrayRef TyInfo) { + ArrayRef 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 TyInfo) { + ArrayRef TyInfo) { LandingPadInfo &LP = getOrCreateLandingPadInfo(LandingPad); std::vector 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; -- cgit v1.1