@@ -181,6 +181,7 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> {
181
181
simple_fn,
182
182
& args. iter ( ) . map ( |arg| arg. immediate ( ) ) . collect :: < Vec < _ > > ( ) ,
183
183
None ,
184
+ Some ( instance) ,
184
185
)
185
186
}
186
187
sym:: likely => {
@@ -539,7 +540,7 @@ fn catch_unwind_intrinsic<'ll>(
539
540
) {
540
541
if bx. sess ( ) . panic_strategy ( ) == PanicStrategy :: Abort {
541
542
let try_func_ty = bx. type_func ( & [ bx. type_ptr ( ) ] , bx. type_void ( ) ) ;
542
- bx. call ( try_func_ty, None , None , try_func, & [ data] , None ) ;
543
+ bx. call ( try_func_ty, None , None , try_func, & [ data] , None , None ) ;
543
544
// Return 0 unconditionally from the intrinsic call;
544
545
// we can never unwind.
545
546
let ret_align = bx. tcx ( ) . data_layout . i32_align . abi ;
@@ -640,7 +641,7 @@ fn codegen_msvc_try<'ll>(
640
641
let ptr_align = bx. tcx ( ) . data_layout . pointer_align . abi ;
641
642
let slot = bx. alloca ( bx. type_ptr ( ) , ptr_align) ;
642
643
let try_func_ty = bx. type_func ( & [ bx. type_ptr ( ) ] , bx. type_void ( ) ) ;
643
- bx. invoke ( try_func_ty, None , None , try_func, & [ data] , normal, catchswitch, None ) ;
644
+ bx. invoke ( try_func_ty, None , None , try_func, & [ data] , normal, catchswitch, None , None ) ;
644
645
645
646
bx. switch_to_block ( normal) ;
646
647
bx. ret ( bx. const_i32 ( 0 ) ) ;
@@ -684,15 +685,15 @@ fn codegen_msvc_try<'ll>(
684
685
let funclet = bx. catch_pad ( cs, & [ tydesc, flags, slot] ) ;
685
686
let ptr = bx. load ( bx. type_ptr ( ) , slot, ptr_align) ;
686
687
let catch_ty = bx. type_func ( & [ bx. type_ptr ( ) , bx. type_ptr ( ) ] , bx. type_void ( ) ) ;
687
- bx. call ( catch_ty, None , None , catch_func, & [ data, ptr] , Some ( & funclet) ) ;
688
+ bx. call ( catch_ty, None , None , catch_func, & [ data, ptr] , Some ( & funclet) , None ) ;
688
689
bx. catch_ret ( & funclet, caught) ;
689
690
690
691
// The flag value of 64 indicates a "catch-all".
691
692
bx. switch_to_block ( catchpad_foreign) ;
692
693
let flags = bx. const_i32 ( 64 ) ;
693
694
let null = bx. const_null ( bx. type_ptr ( ) ) ;
694
695
let funclet = bx. catch_pad ( cs, & [ null, flags, null] ) ;
695
- bx. call ( catch_ty, None , None , catch_func, & [ data, null] , Some ( & funclet) ) ;
696
+ bx. call ( catch_ty, None , None , catch_func, & [ data, null] , Some ( & funclet) , None ) ;
696
697
bx. catch_ret ( & funclet, caught) ;
697
698
698
699
bx. switch_to_block ( caught) ;
@@ -701,7 +702,7 @@ fn codegen_msvc_try<'ll>(
701
702
702
703
// Note that no invoke is used here because by definition this function
703
704
// can't panic (that's what it's catching).
704
- let ret = bx. call ( llty, None , None , llfn, & [ try_func, data, catch_func] , None ) ;
705
+ let ret = bx. call ( llty, None , None , llfn, & [ try_func, data, catch_func] , None , None ) ;
705
706
let i32_align = bx. tcx ( ) . data_layout . i32_align . abi ;
706
707
bx. store ( ret, dest, i32_align) ;
707
708
}
@@ -750,7 +751,7 @@ fn codegen_wasm_try<'ll>(
750
751
// }
751
752
//
752
753
let try_func_ty = bx. type_func ( & [ bx. type_ptr ( ) ] , bx. type_void ( ) ) ;
753
- bx. invoke ( try_func_ty, None , None , try_func, & [ data] , normal, catchswitch, None ) ;
754
+ bx. invoke ( try_func_ty, None , None , try_func, & [ data] , normal, catchswitch, None , None ) ;
754
755
755
756
bx. switch_to_block ( normal) ;
756
757
bx. ret ( bx. const_i32 ( 0 ) ) ;
@@ -766,7 +767,7 @@ fn codegen_wasm_try<'ll>(
766
767
let _sel = bx. call_intrinsic ( "llvm.wasm.get.ehselector" , & [ funclet. cleanuppad ( ) ] ) ;
767
768
768
769
let catch_ty = bx. type_func ( & [ bx. type_ptr ( ) , bx. type_ptr ( ) ] , bx. type_void ( ) ) ;
769
- bx. call ( catch_ty, None , None , catch_func, & [ data, ptr] , Some ( & funclet) ) ;
770
+ bx. call ( catch_ty, None , None , catch_func, & [ data, ptr] , Some ( & funclet) , None ) ;
770
771
bx. catch_ret ( & funclet, caught) ;
771
772
772
773
bx. switch_to_block ( caught) ;
@@ -775,7 +776,7 @@ fn codegen_wasm_try<'ll>(
775
776
776
777
// Note that no invoke is used here because by definition this function
777
778
// can't panic (that's what it's catching).
778
- let ret = bx. call ( llty, None , None , llfn, & [ try_func, data, catch_func] , None ) ;
779
+ let ret = bx. call ( llty, None , None , llfn, & [ try_func, data, catch_func] , None , None ) ;
779
780
let i32_align = bx. tcx ( ) . data_layout . i32_align . abi ;
780
781
bx. store ( ret, dest, i32_align) ;
781
782
}
@@ -818,7 +819,7 @@ fn codegen_gnu_try<'ll>(
818
819
let data = llvm:: get_param ( bx. llfn ( ) , 1 ) ;
819
820
let catch_func = llvm:: get_param ( bx. llfn ( ) , 2 ) ;
820
821
let try_func_ty = bx. type_func ( & [ bx. type_ptr ( ) ] , bx. type_void ( ) ) ;
821
- bx. invoke ( try_func_ty, None , None , try_func, & [ data] , then, catch, None ) ;
822
+ bx. invoke ( try_func_ty, None , None , try_func, & [ data] , then, catch, None , None ) ;
822
823
823
824
bx. switch_to_block ( then) ;
824
825
bx. ret ( bx. const_i32 ( 0 ) ) ;
@@ -836,13 +837,13 @@ fn codegen_gnu_try<'ll>(
836
837
bx. add_clause ( vals, tydesc) ;
837
838
let ptr = bx. extract_value ( vals, 0 ) ;
838
839
let catch_ty = bx. type_func ( & [ bx. type_ptr ( ) , bx. type_ptr ( ) ] , bx. type_void ( ) ) ;
839
- bx. call ( catch_ty, None , None , catch_func, & [ data, ptr] , None ) ;
840
+ bx. call ( catch_ty, None , None , catch_func, & [ data, ptr] , None , None ) ;
840
841
bx. ret ( bx. const_i32 ( 1 ) ) ;
841
842
} ) ;
842
843
843
844
// Note that no invoke is used here because by definition this function
844
845
// can't panic (that's what it's catching).
845
- let ret = bx. call ( llty, None , None , llfn, & [ try_func, data, catch_func] , None ) ;
846
+ let ret = bx. call ( llty, None , None , llfn, & [ try_func, data, catch_func] , None , None ) ;
846
847
let i32_align = bx. tcx ( ) . data_layout . i32_align . abi ;
847
848
bx. store ( ret, dest, i32_align) ;
848
849
}
@@ -882,7 +883,7 @@ fn codegen_emcc_try<'ll>(
882
883
let data = llvm:: get_param ( bx. llfn ( ) , 1 ) ;
883
884
let catch_func = llvm:: get_param ( bx. llfn ( ) , 2 ) ;
884
885
let try_func_ty = bx. type_func ( & [ bx. type_ptr ( ) ] , bx. type_void ( ) ) ;
885
- bx. invoke ( try_func_ty, None , None , try_func, & [ data] , then, catch, None ) ;
886
+ bx. invoke ( try_func_ty, None , None , try_func, & [ data] , then, catch, None , None ) ;
886
887
887
888
bx. switch_to_block ( then) ;
888
889
bx. ret ( bx. const_i32 ( 0 ) ) ;
@@ -920,13 +921,13 @@ fn codegen_emcc_try<'ll>(
920
921
bx. store ( is_rust_panic, catch_data_1, i8_align) ;
921
922
922
923
let catch_ty = bx. type_func ( & [ bx. type_ptr ( ) , bx. type_ptr ( ) ] , bx. type_void ( ) ) ;
923
- bx. call ( catch_ty, None , None , catch_func, & [ data, catch_data] , None ) ;
924
+ bx. call ( catch_ty, None , None , catch_func, & [ data, catch_data] , None , None ) ;
924
925
bx. ret ( bx. const_i32 ( 1 ) ) ;
925
926
} ) ;
926
927
927
928
// Note that no invoke is used here because by definition this function
928
929
// can't panic (that's what it's catching).
929
- let ret = bx. call ( llty, None , None , llfn, & [ try_func, data, catch_func] , None ) ;
930
+ let ret = bx. call ( llty, None , None , llfn, & [ try_func, data, catch_func] , None , None ) ;
930
931
let i32_align = bx. tcx ( ) . data_layout . i32_align . abi ;
931
932
bx. store ( ret, dest, i32_align) ;
932
933
}
@@ -1439,6 +1440,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
1439
1440
f,
1440
1441
& args. iter ( ) . map ( |arg| arg. immediate ( ) ) . collect :: < Vec < _ > > ( ) ,
1441
1442
None ,
1443
+ None ,
1442
1444
) ;
1443
1445
Ok ( c)
1444
1446
}
@@ -1607,6 +1609,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
1607
1609
f,
1608
1610
& [ args[ 1 ] . immediate ( ) , alignment, mask, args[ 0 ] . immediate ( ) ] ,
1609
1611
None ,
1612
+ None ,
1610
1613
) ;
1611
1614
return Ok ( v) ;
1612
1615
}
@@ -1706,6 +1709,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
1706
1709
f,
1707
1710
& [ args[ 1 ] . immediate ( ) , alignment, mask, args[ 2 ] . immediate ( ) ] ,
1708
1711
None ,
1712
+ None ,
1709
1713
) ;
1710
1714
return Ok ( v) ;
1711
1715
}
@@ -1799,6 +1803,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
1799
1803
f,
1800
1804
& [ args[ 2 ] . immediate ( ) , args[ 1 ] . immediate ( ) , alignment, mask] ,
1801
1805
None ,
1806
+ None ,
1802
1807
) ;
1803
1808
return Ok ( v) ;
1804
1809
}
@@ -1904,6 +1909,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
1904
1909
f,
1905
1910
& [ args[ 0 ] . immediate ( ) , args[ 1 ] . immediate ( ) , alignment, mask] ,
1906
1911
None ,
1912
+ None ,
1907
1913
) ;
1908
1914
return Ok ( v) ;
1909
1915
}
@@ -2352,11 +2358,12 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
2352
2358
f,
2353
2359
& [ args[ 0 ] . immediate ( ) , bx. const_int ( bx. type_i1 ( ) , 0 ) ] ,
2354
2360
None ,
2361
+ None ,
2355
2362
) )
2356
2363
} else {
2357
2364
let fn_ty = bx. type_func ( & [ vec_ty] , vec_ty) ;
2358
2365
let f = bx. declare_cfn ( llvm_intrinsic, llvm:: UnnamedAddr :: No , fn_ty) ;
2359
- Ok ( bx. call ( fn_ty, None , None , f, & [ args[ 0 ] . immediate ( ) ] , None ) )
2366
+ Ok ( bx. call ( fn_ty, None , None , f, & [ args[ 0 ] . immediate ( ) ] , None , None ) )
2360
2367
} ;
2361
2368
}
2362
2369
@@ -2409,7 +2416,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
2409
2416
2410
2417
let fn_ty = bx. type_func ( & [ vec_ty, vec_ty] , vec_ty) ;
2411
2418
let f = bx. declare_cfn ( llvm_intrinsic, llvm:: UnnamedAddr :: No , fn_ty) ;
2412
- let v = bx. call ( fn_ty, None , None , f, & [ lhs, rhs] , None ) ;
2419
+ let v = bx. call ( fn_ty, None , None , f, & [ lhs, rhs] , None , None ) ;
2413
2420
return Ok ( v) ;
2414
2421
}
2415
2422
0 commit comments