Mercurial > projects > ldc
comparison ir/irlandingpad.h @ 1051:dc608dc33081
Make IrFuncTy a member of TypeFunction. Reset between modules compiled in the
same LDC call.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 07 Mar 2009 14:25:30 +0100 |
parents | eef8ac26c66c |
children |
comparison
equal
deleted
inserted
replaced
1050:32ead42679d1 | 1051:dc608dc33081 |
---|---|
4 #include "ir/ir.h" | 4 #include "ir/ir.h" |
5 #include "statement.h" | 5 #include "statement.h" |
6 | 6 |
7 #include <deque> | 7 #include <deque> |
8 #include <stack> | 8 #include <stack> |
9 | |
10 namespace llvm { | |
11 class Type; | |
12 class Value; | |
13 class BasicBlock; | |
14 class Function; | |
15 } | |
9 | 16 |
10 // only to be used within IRLandingPad | 17 // only to be used within IRLandingPad |
11 // holds information about a single catch or finally | 18 // holds information about a single catch or finally |
12 struct IRLandingPadInfo | 19 struct IRLandingPadInfo |
13 { | 20 { |
55 | 62 |
56 // gets the current landing pad | 63 // gets the current landing pad |
57 llvm::BasicBlock* get(); | 64 llvm::BasicBlock* get(); |
58 | 65 |
59 // creates or gets storage for exception object | 66 // creates or gets storage for exception object |
60 LLValue* getExceptionStorage(); | 67 llvm::Value* getExceptionStorage(); |
61 | 68 |
62 private: | 69 private: |
63 // constructs the landing pad from infos | 70 // constructs the landing pad from infos |
64 void constructLandingPad(llvm::BasicBlock* inBB); | 71 void constructLandingPad(llvm::BasicBlock* inBB); |
65 | 72 |
75 | 82 |
76 // associate increasing ints with each unique classdecl encountered | 83 // associate increasing ints with each unique classdecl encountered |
77 std::map<ClassDeclaration*, int> catchToInt; | 84 std::map<ClassDeclaration*, int> catchToInt; |
78 | 85 |
79 // storage for the catch variable | 86 // storage for the catch variable |
80 LLValue* catch_var; | 87 llvm::Value* catch_var; |
81 }; | 88 }; |
82 | 89 |
83 #endif | 90 #endif |