class InvokeInst;
class IntrinsicInst;
class LandingPadInst;
+class MCExpr;
class MCSymbol;
class MachineBasicBlock;
class Value;
// exceptions on Windows.
typedef PointerUnion<const BasicBlock *, MachineBasicBlock *> MBBOrBasicBlock;
-typedef PointerUnion<const Value *, MachineBasicBlock *> ValueOrMBB;
+typedef PointerUnion<const Value *, const MachineBasicBlock *> ValueOrMBB;
struct WinEHUnwindMapEntry {
int ToState;
struct WinEHFuncInfo {
DenseMap<const Instruction *, int> EHPadStateMap;
+ DenseMap<const CatchReturnInst *, const BasicBlock *>
+ CatchRetSuccessorColorMap;
+ DenseMap<MCSymbol *, std::pair<int, MCSymbol *>> InvokeToStateMap;
SmallVector<WinEHUnwindMapEntry, 4> UnwindMap;
SmallVector<WinEHTryBlockMapEntry, 4> TryBlockMap;
SmallVector<SEHUnwindMapEntry, 4> SEHUnwindMap;
- SmallVector<std::pair<MCSymbol *, int>, 4> IPToStateList;
int UnwindHelpFrameIdx = INT_MAX;
int UnwindHelpFrameOffset = -1;
int getLastStateNumber() const { return UnwindMap.size() - 1; }
+ void addIPToStateRange(const BasicBlock *PadBB, MCSymbol *InvokeBegin,
+ MCSymbol *InvokeEnd);
+
/// localescape index of the 32-bit EH registration node. Set by
/// WinEHStatePass and used indirectly by SEH filter functions of the parent.
int EHRegNodeEscapeIndex = INT_MAX;
void calculateSEHStateNumbers(const Function *ParentFn,
WinEHFuncInfo &FuncInfo);
+
+void calculateCatchReturnSuccessorColors(const Function *Fn,
+ WinEHFuncInfo &FuncInfo);
}
#endif // LLVM_CODEGEN_WINEHFUNCINFO_H