aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineModuleInfo.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-10-05 22:20:38 +0000
committerBill Wendling <isanbard@gmail.com>2011-10-05 22:20:38 +0000
commitc2d55b6e502dd57edf6252efcd0498ae704fb2ee (patch)
treef4a32fd3507306c136b9428cf17e6c7685aa4d95 /llvm/lib/CodeGen/MachineModuleInfo.cpp
parent8dd5c17d69bfa54a61e708cd7858e1e77260362a (diff)
downloadllvm-c2d55b6e502dd57edf6252efcd0498ae704fb2ee.zip
llvm-c2d55b6e502dd57edf6252efcd0498ae704fb2ee.tar.gz
llvm-c2d55b6e502dd57edf6252efcd0498ae704fb2ee.tar.bz2
Add an ivar that maps a landing pad's EH symbol to the call sites that may jump
to the landing pad. This will be used by the back-end to generate the jump tables for dispatching the arriving longjmp in sjlj eh. llvm-svn: 141224
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineModuleInfo.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp
index 58ced92..80c4854 100644
--- a/llvm/lib/CodeGen/MachineModuleInfo.cpp
+++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp
@@ -499,6 +499,14 @@ void MachineModuleInfo::TidyLandingPads(DenseMap<MCSymbol*, uintptr_t> *LPMap) {
}
}
+/// setCallSiteLandingPad - Map the landing pad's EH symbol to the call site
+/// indexes.
+void MachineModuleInfo::setCallSiteLandingPad(MCSymbol *Sym,
+ ArrayRef<unsigned> Sites) {
+ for (unsigned I = 0, E = Sites.size(); I != E; ++I)
+ LPadToCallSiteMap[Sym].push_back(Sites[I]);
+}
+
/// getTypeIDFor - Return the type id for the specified typeinfo. This is
/// function wide.
unsigned MachineModuleInfo::getTypeIDFor(const GlobalVariable *TI) {