Add support for implicit rethrows in @catch blocks.

Comment exception-handling code generation strategy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56763 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index 36130cf..6aa2e4e 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/lib/CodeGen/CodeGenFunction.h
@@ -79,6 +79,22 @@
 
   const llvm::Type *LLVMIntTy;
   uint32_t LLVMPointerWidth;
+
+public:
+  // FIXME: The following should be private once EH code is moved out
+  // of NeXT runtime.
+
+  // ObjCEHStack - This keeps track of which object to rethrow from
+  // inside @catch blocks and which @finally block exits from an EH
+  // scope should be chained through.
+  struct ObjCEHEntry {
+    ObjCEHEntry(llvm::BasicBlock *fb)
+      : Exception(0), FinallyBlock(fb) {}
+
+    llvm::Value *Exception;
+    llvm::BasicBlock *FinallyBlock;
+  };
+  llvm::SmallVector<ObjCEHEntry, 8> ObjCEHStack;
   
 private:
   /// LabelIDs - Track arbitrary ids assigned to labels for use in
@@ -108,7 +124,7 @@
     llvm::BasicBlock *ContinueBlock;
   }; 
   llvm::SmallVector<BreakContinue, 8> BreakContinueStack;
-  
+
   /// SwitchInsn - This is nearest current switch instruction. It is null if
   /// if current context is not in a switch.
   llvm::SwitchInst *SwitchInsn;