@@ -181,6 +181,7 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> {
181181 simple_fn,
182182 & args. iter ( ) . map ( |arg| arg. immediate ( ) ) . collect :: < Vec < _ > > ( ) ,
183183 None ,
184+ Some ( instance) ,
184185 )
185186 }
186187 sym:: likely => {
@@ -539,7 +540,7 @@ fn catch_unwind_intrinsic<'ll>(
539540) {
540541 if bx. sess ( ) . panic_strategy ( ) == PanicStrategy :: Abort {
541542 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 ) ;
543544 // Return 0 unconditionally from the intrinsic call;
544545 // we can never unwind.
545546 let ret_align = bx. tcx ( ) . data_layout . i32_align . abi ;
@@ -640,7 +641,7 @@ fn codegen_msvc_try<'ll>(
640641 let ptr_align = bx. tcx ( ) . data_layout . pointer_align . abi ;
641642 let slot = bx. alloca ( bx. type_ptr ( ) , ptr_align) ;
642643 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 ) ;
644645
645646 bx. switch_to_block ( normal) ;
646647 bx. ret ( bx. const_i32 ( 0 ) ) ;
@@ -684,15 +685,15 @@ fn codegen_msvc_try<'ll>(
684685 let funclet = bx. catch_pad ( cs, & [ tydesc, flags, slot] ) ;
685686 let ptr = bx. load ( bx. type_ptr ( ) , slot, ptr_align) ;
686687 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 ) ;
688689 bx. catch_ret ( & funclet, caught) ;
689690
690691 // The flag value of 64 indicates a "catch-all".
691692 bx. switch_to_block ( catchpad_foreign) ;
692693 let flags = bx. const_i32 ( 64 ) ;
693694 let null = bx. const_null ( bx. type_ptr ( ) ) ;
694695 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 ) ;
696697 bx. catch_ret ( & funclet, caught) ;
697698
698699 bx. switch_to_block ( caught) ;
@@ -701,7 +702,7 @@ fn codegen_msvc_try<'ll>(
701702
702703 // Note that no invoke is used here because by definition this function
703704 // 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 ) ;
705706 let i32_align = bx. tcx ( ) . data_layout . i32_align . abi ;
706707 bx. store ( ret, dest, i32_align) ;
707708}
@@ -750,7 +751,7 @@ fn codegen_wasm_try<'ll>(
750751 // }
751752 //
752753 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 ) ;
754755
755756 bx. switch_to_block ( normal) ;
756757 bx. ret ( bx. const_i32 ( 0 ) ) ;
@@ -766,7 +767,7 @@ fn codegen_wasm_try<'ll>(
766767 let _sel = bx. call_intrinsic ( "llvm.wasm.get.ehselector" , & [ funclet. cleanuppad ( ) ] ) ;
767768
768769 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 ) ;
770771 bx. catch_ret ( & funclet, caught) ;
771772
772773 bx. switch_to_block ( caught) ;
@@ -775,7 +776,7 @@ fn codegen_wasm_try<'ll>(
775776
776777 // Note that no invoke is used here because by definition this function
777778 // 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 ) ;
779780 let i32_align = bx. tcx ( ) . data_layout . i32_align . abi ;
780781 bx. store ( ret, dest, i32_align) ;
781782}
@@ -818,7 +819,7 @@ fn codegen_gnu_try<'ll>(
818819 let data = llvm:: get_param ( bx. llfn ( ) , 1 ) ;
819820 let catch_func = llvm:: get_param ( bx. llfn ( ) , 2 ) ;
820821 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 ) ;
822823
823824 bx. switch_to_block ( then) ;
824825 bx. ret ( bx. const_i32 ( 0 ) ) ;
@@ -836,13 +837,13 @@ fn codegen_gnu_try<'ll>(
836837 bx. add_clause ( vals, tydesc) ;
837838 let ptr = bx. extract_value ( vals, 0 ) ;
838839 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 ) ;
840841 bx. ret ( bx. const_i32 ( 1 ) ) ;
841842 } ) ;
842843
843844 // Note that no invoke is used here because by definition this function
844845 // 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 ) ;
846847 let i32_align = bx. tcx ( ) . data_layout . i32_align . abi ;
847848 bx. store ( ret, dest, i32_align) ;
848849}
@@ -882,7 +883,7 @@ fn codegen_emcc_try<'ll>(
882883 let data = llvm:: get_param ( bx. llfn ( ) , 1 ) ;
883884 let catch_func = llvm:: get_param ( bx. llfn ( ) , 2 ) ;
884885 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 ) ;
886887
887888 bx. switch_to_block ( then) ;
888889 bx. ret ( bx. const_i32 ( 0 ) ) ;
@@ -920,13 +921,13 @@ fn codegen_emcc_try<'ll>(
920921 bx. store ( is_rust_panic, catch_data_1, i8_align) ;
921922
922923 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 ) ;
924925 bx. ret ( bx. const_i32 ( 1 ) ) ;
925926 } ) ;
926927
927928 // Note that no invoke is used here because by definition this function
928929 // 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 ) ;
930931 let i32_align = bx. tcx ( ) . data_layout . i32_align . abi ;
931932 bx. store ( ret, dest, i32_align) ;
932933}
@@ -1439,6 +1440,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
14391440 f,
14401441 & args. iter ( ) . map ( |arg| arg. immediate ( ) ) . collect :: < Vec < _ > > ( ) ,
14411442 None ,
1443+ None ,
14421444 ) ;
14431445 Ok ( c)
14441446 }
@@ -1607,6 +1609,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
16071609 f,
16081610 & [ args[ 1 ] . immediate ( ) , alignment, mask, args[ 0 ] . immediate ( ) ] ,
16091611 None ,
1612+ None ,
16101613 ) ;
16111614 return Ok ( v) ;
16121615 }
@@ -1706,6 +1709,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
17061709 f,
17071710 & [ args[ 1 ] . immediate ( ) , alignment, mask, args[ 2 ] . immediate ( ) ] ,
17081711 None ,
1712+ None ,
17091713 ) ;
17101714 return Ok ( v) ;
17111715 }
@@ -1799,6 +1803,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
17991803 f,
18001804 & [ args[ 2 ] . immediate ( ) , args[ 1 ] . immediate ( ) , alignment, mask] ,
18011805 None ,
1806+ None ,
18021807 ) ;
18031808 return Ok ( v) ;
18041809 }
@@ -1904,6 +1909,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
19041909 f,
19051910 & [ args[ 0 ] . immediate ( ) , args[ 1 ] . immediate ( ) , alignment, mask] ,
19061911 None ,
1912+ None ,
19071913 ) ;
19081914 return Ok ( v) ;
19091915 }
@@ -2352,11 +2358,12 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
23522358 f,
23532359 & [ args[ 0 ] . immediate ( ) , bx. const_int ( bx. type_i1 ( ) , 0 ) ] ,
23542360 None ,
2361+ None ,
23552362 ) )
23562363 } else {
23572364 let fn_ty = bx. type_func ( & [ vec_ty] , vec_ty) ;
23582365 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 ) )
23602367 } ;
23612368 }
23622369
@@ -2409,7 +2416,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
24092416
24102417 let fn_ty = bx. type_func ( & [ vec_ty, vec_ty] , vec_ty) ;
24112418 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 ) ;
24132420 return Ok ( v) ;
24142421 }
24152422
0 commit comments