From 84fb7dd09e35ee7d32f9d1d88f7dbc3dc706ad7d Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 5 Oct 2011 22:20:38 +0000 Subject: 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 --- include/llvm/CodeGen/MachineModuleInfo.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include/llvm/CodeGen/MachineModuleInfo.h') diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h index 4daa663bac..a09a71400d 100644 --- a/include/llvm/CodeGen/MachineModuleInfo.h +++ b/include/llvm/CodeGen/MachineModuleInfo.h @@ -119,6 +119,10 @@ class MachineModuleInfo : public ImmutablePass { /// information in the current function. std::vector LandingPads; + /// LPadToCallSiteMap - Map a landing pad's EH symbol to the call site + /// indexes. + DenseMap > LPadToCallSiteMap; + /// CallSiteMap - Map of invoke call site index values to associated begin /// EH_LABEL for the current function. DenseMap 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 Sites); + + /// getCallSiteLandingPad - Get the call site indexes for a landing pad EH + /// symbol. + SmallVectorImpl &getCallSiteLandingPad(MCSymbol *Sym) { + return LPadToCallSiteMap[Sym]; + } + /// setCallSiteBeginLabel - Map the begin label for a call site. void setCallSiteBeginLabel(MCSymbol *BeginLabel, unsigned Site) { CallSiteMap[BeginLabel] = Site; -- cgit v1.2.3-18-g5258