comparison gen/aa.cpp @ 1013:8c73ff5f69e0

Use llvm::CallSite instead of custom CallOrInvoke class.
author Frits van Bommel <fvbommel wxs.nl>
date Sat, 28 Feb 2009 22:16:52 +0100
parents 03d7c4aac654
children af625ea2d3cf
comparison
equal deleted inserted replaced
1012:39cf8fa483fd 1013:8c73ff5f69e0
82 // pkey param 82 // pkey param
83 LLValue* pkey = to_pkey(loc, key); 83 LLValue* pkey = to_pkey(loc, key);
84 pkey = DtoBitCast(pkey, funcTy->getParamType(3)); 84 pkey = DtoBitCast(pkey, funcTy->getParamType(3));
85 85
86 // call runtime 86 // call runtime
87 LLValue* ret = gIR->CreateCallOrInvoke4(func, aaval, keyti, valsize, pkey, "aa.index")->get(); 87 LLValue* ret = gIR->CreateCallOrInvoke4(func, aaval, keyti, valsize, pkey, "aa.index").getInstruction();
88 88
89 // cast return value 89 // cast return value
90 const LLType* targettype = getPtrToType(DtoType(type)); 90 const LLType* targettype = getPtrToType(DtoType(type));
91 if (ret->getType() != targettype) 91 if (ret->getType() != targettype)
92 ret = DtoBitCast(ret, targettype); 92 ret = DtoBitCast(ret, targettype);
124 // pkey param 124 // pkey param
125 LLValue* pkey = to_pkey(loc, key); 125 LLValue* pkey = to_pkey(loc, key);
126 pkey = DtoBitCast(pkey, funcTy->getParamType(2)); 126 pkey = DtoBitCast(pkey, funcTy->getParamType(2));
127 127
128 // call runtime 128 // call runtime
129 LLValue* ret = gIR->CreateCallOrInvoke3(func, aaval, keyti, pkey, "aa.in")->get(); 129 LLValue* ret = gIR->CreateCallOrInvoke3(func, aaval, keyti, pkey, "aa.in").getInstruction();
130 130
131 // cast return value 131 // cast return value
132 const LLType* targettype = DtoType(type); 132 const LLType* targettype = DtoType(type);
133 if (ret->getType() != targettype) 133 if (ret->getType() != targettype)
134 ret = DtoBitCast(ret, targettype); 134 ret = DtoBitCast(ret, targettype);