summaryrefslogtreecommitdiff
path: root/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
commit84fb7dd09e35ee7d32f9d1d88f7dbc3dc706ad7d (patch)
tree641b994dba486ba31a5f47a6f73e9eae8163ba81 /lib/CodeGen/MachineModuleInfo.cpp
parent6f500541eac11413364f1d79320a2307079d3bbd (diff)
downloadllvm-84fb7dd09e35ee7d32f9d1d88f7dbc3dc706ad7d.tar.gz
llvm-84fb7dd09e35ee7d32f9d1d88f7dbc3dc706ad7d.tar.bz2
llvm-84fb7dd09e35ee7d32f9d1d88f7dbc3dc706ad7d.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141224 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r--lib/CodeGen/MachineModuleInfo.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp
index 58ced92237..80c4854238 100644
--- a/lib/CodeGen/MachineModuleInfo.cpp
+++ b/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) {