mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
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
This commit is contained in:
parent
dfda32ab43
commit
94f80818c1
@ -119,6 +119,10 @@ class MachineModuleInfo : public ImmutablePass {
|
||||
/// information in the current function.
|
||||
std::vector<LandingPadInfo> LandingPads;
|
||||
|
||||
/// LPadToCallSiteMap - Map a landing pad's EH symbol to the call site
|
||||
/// indexes.
|
||||
DenseMap<MCSymbol*, SmallVector<unsigned, 4> > LPadToCallSiteMap;
|
||||
|
||||
/// CallSiteMap - Map of invoke call site index values to associated begin
|
||||
/// EH_LABEL for the current function.
|
||||
DenseMap<MCSymbol*, unsigned> CallSiteMap;
|
||||
@ -327,6 +331,16 @@ public:
|
||||
return LandingPads;
|
||||
}
|
||||
|
||||
/// setCallSiteLandingPad - Map the landing pad's EH symbol to the call
|
||||
/// site indexes.
|
||||
void setCallSiteLandingPad(MCSymbol *Sym, ArrayRef<unsigned> Sites);
|
||||
|
||||
/// getCallSiteLandingPad - Get the call site indexes for a landing pad EH
|
||||
/// symbol.
|
||||
SmallVectorImpl<unsigned> &getCallSiteLandingPad(MCSymbol *Sym) {
|
||||
return LPadToCallSiteMap[Sym];
|
||||
}
|
||||
|
||||
/// setCallSiteBeginLabel - Map the begin label for a call site.
|
||||
void setCallSiteBeginLabel(MCSymbol *BeginLabel, unsigned Site) {
|
||||
CallSiteMap[BeginLabel] = Site;
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user