aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-09-28 01:03:14 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-09-28 01:03:14 +0000
commit18ccc7776ad6288c5f630dc7967fb99d099c9cd9 (patch)
tree6fe9fff4ff2792f19fde8d27c7f238ec8a95f2b0 /lib/CodeGen/CodeGenFunction.h
parentad12b6d643aba6c36f5cec4c9beb4977a12eace4 (diff)
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
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r--lib/CodeGen/CodeGenFunction.h18
1 files changed, 17 insertions, 1 deletions
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<ObjCEHEntry, 8> ObjCEHStack;
private:
/// LabelIDs - Track arbitrary ids assigned to labels for use in
@@ -108,7 +124,7 @@ private:
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;