Mercurial > projects > ldc
comparison ir/irfunction.h @ 145:8f704cb9969b trunk
[svn r150] fixes #16 and #17, implements GotoCaseStatement
author | ChristianK |
---|---|
date | Sat, 08 Mar 2008 15:22:07 +0100 |
parents | 0e28624814e8 |
children | e881c9b1c738 |
comparison
equal
deleted
inserted
replaced
144:a27941d00351 | 145:8f704cb9969b |
---|---|
2 #define LLVMDC_IR_IRFUNCTION_H | 2 #define LLVMDC_IR_IRFUNCTION_H |
3 | 3 |
4 #include "ir/ir.h" | 4 #include "ir/ir.h" |
5 | 5 |
6 #include <vector> | 6 #include <vector> |
7 | |
8 // represents a finally block | |
9 struct IrFinally | |
10 { | |
11 llvm::BasicBlock* bb; | |
12 llvm::BasicBlock* retbb; | |
13 | |
14 IrFinally(); | |
15 IrFinally(llvm::BasicBlock* b, llvm::BasicBlock* rb); | |
16 }; | |
17 | 7 |
18 // represents a function | 8 // represents a function |
19 struct IrFunction : IrBase | 9 struct IrFunction : IrBase |
20 { | 10 { |
21 llvm::Function* func; | 11 llvm::Function* func; |
22 llvm::Instruction* allocapoint; | 12 llvm::Instruction* allocapoint; |
23 FuncDeclaration* decl; | 13 FuncDeclaration* decl; |
24 TypeFunction* type; | 14 TypeFunction* type; |
25 | |
26 // finally blocks | |
27 typedef std::vector<IrFinally> FinallyVec; | |
28 FinallyVec finallys; | |
29 llvm::Value* finallyretval; | |
30 | 15 |
31 bool queued; | 16 bool queued; |
32 bool defined; | 17 bool defined; |
33 llvm::Value* retArg; | 18 llvm::Value* retArg; |
34 llvm::Value* thisVar; | 19 llvm::Value* thisVar; |