Mercurial > projects > ldc
comparison gen/irstate.cpp @ 315:a9697749e898 trunk
[svn r336] Made sure calls within a landing pad area are invokes.
Nested trys still need some consideration.
author | ChristianK |
---|---|
date | Thu, 03 Jul 2008 22:05:45 +0200 |
parents | 9967a3270837 |
children | 0d52412d5b1a |
comparison
equal
deleted
inserted
replaced
314:8d98e42ece93 | 315:a9697749e898 |
---|---|
121 { | 121 { |
122 //return scope().returned; | 122 //return scope().returned; |
123 return !scopebb()->empty() && scopebb()->back().isTerminator(); | 123 return !scopebb()->empty() && scopebb()->back().isTerminator(); |
124 } | 124 } |
125 | 125 |
126 CallOrInvoke* IRState::CreateCallOrInvoke(LLValue* Callee, const char* Name) | |
127 { | |
128 LLSmallVector<LLValue*, 1> args; | |
129 return CreateCallOrInvoke(Callee, args.begin(), args.end(), Name); | |
130 } | |
131 | |
132 CallOrInvoke* IRState::CreateCallOrInvoke(LLValue* Callee, LLValue* Arg1, const char* Name) | |
133 { | |
134 LLSmallVector<LLValue*, 1> args; | |
135 args.push_back(Arg1); | |
136 return CreateCallOrInvoke(Callee, args.begin(), args.end(), Name); | |
137 } | |
138 | |
139 CallOrInvoke* IRState::CreateCallOrInvoke2(LLValue* Callee, LLValue* Arg1, LLValue* Arg2, const char* Name) | |
140 { | |
141 LLSmallVector<LLValue*, 2> args; | |
142 args.push_back(Arg1); | |
143 args.push_back(Arg2); | |
144 return CreateCallOrInvoke(Callee, args.begin(), args.end(), Name); | |
145 } | |
146 | |
147 CallOrInvoke* IRState::CreateCallOrInvoke3(LLValue* Callee, LLValue* Arg1, LLValue* Arg2, LLValue* Arg3, const char* Name) | |
148 { | |
149 LLSmallVector<LLValue*, 3> args; | |
150 args.push_back(Arg1); | |
151 args.push_back(Arg2); | |
152 args.push_back(Arg3); | |
153 return CreateCallOrInvoke(Callee, args.begin(), args.end(), Name); | |
154 } | |
155 | |
156 CallOrInvoke* IRState::CreateCallOrInvoke4(LLValue* Callee, LLValue* Arg1, LLValue* Arg2, LLValue* Arg3, LLValue* Arg4, const char* Name) | |
157 { | |
158 LLSmallVector<LLValue*, 4> args; | |
159 args.push_back(Arg1); | |
160 args.push_back(Arg2); | |
161 args.push_back(Arg3); | |
162 args.push_back(Arg4); | |
163 return CreateCallOrInvoke(Callee, args.begin(), args.end(), Name); | |
164 } | |
165 | |
166 | |
126 ////////////////////////////////////////////////////////////////////////////////////////// | 167 ////////////////////////////////////////////////////////////////////////////////////////// |
127 | 168 |
128 IRBuilder* IRBuilderHelper::operator->() | 169 IRBuilder* IRBuilderHelper::operator->() |
129 { | 170 { |
130 IRBuilder& b = state->scope().builder; | 171 IRBuilder& b = state->scope().builder; |