File tree 1 file changed +5
-1
lines changed
src/librustc_codegen_llvm
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -952,11 +952,15 @@ fn codegen_msvc_try(
952
952
let cs = catchswitch. catch_switch ( None , None , 1 ) ;
953
953
catchswitch. add_handler ( cs, catchpad. llbb ( ) ) ;
954
954
955
+ // The flag value of 8 indicates that we are catching the exception by
956
+ // reference instead of by value.
957
+ //
958
+ // Source: MicrosoftCXXABI::getAddrOfCXXCatchHandlerType in clang
959
+ let flags = bx. const_i32 ( 8 ) ;
955
960
let tydesc = match bx. tcx ( ) . lang_items ( ) . eh_catch_typeinfo ( ) {
956
961
Some ( did) => bx. get_static ( did) ,
957
962
None => bug ! ( "eh_catch_typeinfo not defined, but needed for SEH unwinding" ) ,
958
963
} ;
959
- let flags = bx. const_i32 ( 8 ) ; // Catch by reference
960
964
let funclet = catchpad. catch_pad ( cs, & [ tydesc, flags, slot] ) ;
961
965
962
966
let i64_align = bx. tcx ( ) . data_layout . i64_align . abi ;
You can’t perform that action at this time.
0 commit comments