// Forward declarations.
class Constant;
class GlobalVariable;
+class BlockAddress;
class MDNode;
class MMIAddrLabelMap;
class MachineBasicBlock;
class StructType;
struct WinEHFuncInfo;
+struct SEHHandler {
+ // Filter or finally function. Null indicates a catch-all.
+ const Function *FilterOrFinally;
+
+ // Address of block to recover at. Null for a finally handler.
+ const BlockAddress *RecoverBA;
+};
+
//===----------------------------------------------------------------------===//
/// LandingPadInfo - This structure is used to retain landing pad info for
/// the current function.
MachineBasicBlock *LandingPadBlock; // Landing pad block.
SmallVector<MCSymbol *, 1> BeginLabels; // Labels prior to invoke.
SmallVector<MCSymbol *, 1> EndLabels; // Labels after invoke.
- SmallVector<MCSymbol *, 1> ClauseLabels; // Labels for each clause.
+ SmallVector<SEHHandler, 1> SEHHandlers; // SEH handlers active at this lpad.
MCSymbol *LandingPadLabel; // Label at beginning of landing pad.
const Function *Personality; // Personality function.
std::vector<int> TypeIds; // List of type ids (filters negative).
///
void addCleanup(MachineBasicBlock *LandingPad);
- /// Add a clause for a landing pad. Returns a new label for the clause. This
- /// is used by EH schemes that have more than one landing pad. In this case,
- /// each clause gets its own basic block.
- MCSymbol *addClauseForLandingPad(MachineBasicBlock *LandingPad);
+ void addSEHCatchHandler(MachineBasicBlock *LandingPad, const Function *Filter,
+ const BlockAddress *RecoverLabel);
+
+ void addSEHCleanupHandler(MachineBasicBlock *LandingPad,
+ const Function *Cleanup);
/// getTypeIDFor - Return the type id for the specified typeinfo. This is
/// function wide.