[WinEH] Pull Adjectives and CatchObj out of the catchpad arg list
[oota-llvm.git] / include / llvm / CodeGen / WinEHFuncInfo.h
index 31021f12858f4956c09a7fc135b719c0a905c9ca..1c81c71328948b1f874a14e48bdb9d7d6acb6da6 100644 (file)
@@ -139,8 +139,15 @@ struct SEHUnwindMapEntry {
 
 struct WinEHHandlerType {
   int Adjectives;
-  GlobalVariable *TypeDescriptor;
   int CatchObjRecoverIdx;
+  /// The CatchObj starts out life as an LLVM alloca, is turned into a frame
+  /// index, and after PEI, becomes a raw offset.
+  union {
+    const AllocaInst *Alloca;
+    int FrameOffset;
+    int FrameIndex;
+  } CatchObj = {};
+  GlobalVariable *TypeDescriptor;
   ValueOrMBB Handler;
 };
 
@@ -176,6 +183,7 @@ struct WinEHFuncInfo {
   int EHRegNodeEscapeIndex = INT_MAX;
   const AllocaInst *EHRegNode = nullptr;
   int EHRegNodeFrameIndex = INT_MAX;
+  int EHRegNodeEndOffset = INT_MAX;
 
   WinEHFuncInfo() {}
 };