From 18ccc7776ad6288c5f630dc7967fb99d099c9cd9 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Sun, 28 Sep 2008 01:03:14 +0000 Subject: 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 --- lib/CodeGen/CodeGenFunction.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CodeGenFunction.h') diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index 36130cf6a8..6aa2e4e79d 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -79,6 +79,22 @@ public: 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 ObjCEHStack; private: /// LabelIDs - Track arbitrary ids assigned to labels for use in @@ -108,7 +124,7 @@ private: llvm::BasicBlock *ContinueBlock; }; llvm::SmallVector BreakContinueStack; - + /// SwitchInsn - This is nearest current switch instruction. It is null if /// if current context is not in a switch. llvm::SwitchInst *SwitchInsn; -- cgit v1.2.3-70-g09d2