diff options
author | Reid Kleckner <reid@kleckner.net> | 2014-11-14 00:35:50 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2014-11-14 00:35:50 +0000 |
commit | 283bc2ed28f423c29ab57a2b491d2ebdb53a4b12 (patch) | |
tree | b3a1978d772d25c68d2a8b3a9829c74f4abb6f24 /llvm/lib/CodeGen/MachineModuleInfo.cpp | |
parent | d318df403a123ac3afe8eecf3bd53cd0c588c8dc (diff) | |
download | llvm-283bc2ed28f423c29ab57a2b491d2ebdb53a4b12.zip llvm-283bc2ed28f423c29ab57a2b491d2ebdb53a4b12.tar.gz llvm-283bc2ed28f423c29ab57a2b491d2ebdb53a4b12.tar.bz2 |
Allow the use of functions as typeinfo in landingpad clauses
This is one step towards supporting SEH filter functions in LLVM.
llvm-svn: 221954
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineModuleInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<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; |