@@ -1261,10 +1261,10 @@ llvm_compile_expr(ExprState *state)
1261
1261
{
1262
1262
FunctionCallInfo fcinfo_out ,
1263
1263
fcinfo_in ;
1264
+ LLVMValueRef v_fn_out ,
1265
+ v_fn_in ;
1264
1266
LLVMValueRef v_fcinfo_out ,
1265
1267
v_fcinfo_in ;
1266
- LLVMValueRef v_fn_addr_out ,
1267
- v_fn_addr_in ;
1268
1268
LLVMValueRef v_fcinfo_in_isnullp ;
1269
1269
LLVMValueRef v_retval ;
1270
1270
LLVMValueRef v_resvalue ;
@@ -1290,10 +1290,10 @@ llvm_compile_expr(ExprState *state)
1290
1290
b_inputcall = l_bb_before_v (opblocks [opno + 1 ],
1291
1291
"op.%d.inputcall" , opno );
1292
1292
1293
+ v_fn_out = llvm_function_reference (context , b , mod , fcinfo_out );
1294
+ v_fn_in = llvm_function_reference (context , b , mod , fcinfo_in );
1293
1295
v_fcinfo_out = l_ptr_const (fcinfo_out , l_ptr (StructFunctionCallInfoData ));
1294
1296
v_fcinfo_in = l_ptr_const (fcinfo_in , l_ptr (StructFunctionCallInfoData ));
1295
- v_fn_addr_out = l_ptr_const (fcinfo_out -> flinfo -> fn_addr , TypePGFunction );
1296
- v_fn_addr_in = l_ptr_const (fcinfo_in -> flinfo -> fn_addr , TypePGFunction );
1297
1297
1298
1298
v_fcinfo_in_isnullp =
1299
1299
LLVMBuildStructGEP (b , v_fcinfo_in ,
@@ -1323,7 +1323,7 @@ llvm_compile_expr(ExprState *state)
1323
1323
l_sbool_const (0 ),
1324
1324
l_funcnullp (b , v_fcinfo_out , 0 ));
1325
1325
/* and call output function (can never return NULL) */
1326
- v_output = LLVMBuildCall (b , v_fn_addr_out , & v_fcinfo_out ,
1326
+ v_output = LLVMBuildCall (b , v_fn_out , & v_fcinfo_out ,
1327
1327
1 , "funccall_coerce_out" );
1328
1328
LLVMBuildBr (b , b_input );
1329
1329
@@ -1378,7 +1378,7 @@ llvm_compile_expr(ExprState *state)
1378
1378
/* reset fcinfo_in->isnull */
1379
1379
LLVMBuildStore (b , l_sbool_const (0 ), v_fcinfo_in_isnullp );
1380
1380
/* and call function */
1381
- v_retval = LLVMBuildCall (b , v_fn_addr_in , & v_fcinfo_in , 1 ,
1381
+ v_retval = LLVMBuildCall (b , v_fn_in , & v_fcinfo_in , 1 ,
1382
1382
"funccall_iocoerce_in" );
1383
1383
1384
1384
LLVMBuildStore (b , v_retval , v_resvaluep );
0 commit comments