Mercurial > projects > ldc
comparison gen/aa.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 | 665b81613475 |
children | 0e6b4d65d3f8 |
comparison
equal
deleted
inserted
replaced
314:8d98e42ece93 | 315:a9697749e898 |
---|---|
85 // pkey param | 85 // pkey param |
86 LLValue* pkey = to_pkey(key); | 86 LLValue* pkey = to_pkey(key); |
87 pkey = DtoBitCast(pkey, funcTy->getParamType(3)); | 87 pkey = DtoBitCast(pkey, funcTy->getParamType(3)); |
88 | 88 |
89 // call runtime | 89 // call runtime |
90 LLValue* ret = gIR->ir->CreateCall4(func, aaval, keyti, valsize, pkey, "aa.index"); | 90 LLValue* ret = gIR->CreateCallOrInvoke4(func, aaval, keyti, valsize, pkey, "aa.index")->get(); |
91 | 91 |
92 // cast return value | 92 // cast return value |
93 const LLType* targettype = getPtrToType(DtoType(type)); | 93 const LLType* targettype = getPtrToType(DtoType(type)); |
94 if (ret->getType() != targettype) | 94 if (ret->getType() != targettype) |
95 ret = DtoBitCast(ret, targettype); | 95 ret = DtoBitCast(ret, targettype); |
123 // pkey param | 123 // pkey param |
124 LLValue* pkey = to_pkey(key); | 124 LLValue* pkey = to_pkey(key); |
125 pkey = DtoBitCast(pkey, funcTy->getParamType(2)); | 125 pkey = DtoBitCast(pkey, funcTy->getParamType(2)); |
126 | 126 |
127 // call runtime | 127 // call runtime |
128 LLValue* ret = gIR->ir->CreateCall3(func, aaval, keyti, pkey, "aa.in"); | 128 LLValue* ret = gIR->CreateCallOrInvoke3(func, aaval, keyti, pkey, "aa.in")->get(); |
129 | 129 |
130 // cast return value | 130 // cast return value |
131 const LLType* targettype = DtoType(type); | 131 const LLType* targettype = DtoType(type); |
132 if (ret->getType() != targettype) | 132 if (ret->getType() != targettype) |
133 ret = DtoBitCast(ret, targettype); | 133 ret = DtoBitCast(ret, targettype); |
167 args.push_back(aaval); | 167 args.push_back(aaval); |
168 args.push_back(keyti); | 168 args.push_back(keyti); |
169 args.push_back(pkey); | 169 args.push_back(pkey); |
170 | 170 |
171 // call runtime | 171 // call runtime |
172 gIR->ir->CreateCall(func, args.begin(), args.end(),""); | 172 gIR->CreateCallOrInvoke(func, args.begin(), args.end()); |
173 } | 173 } |