@@ -47,12 +47,12 @@ pub(crate) fn conv_to_call_conv(sess: &Session, c: Conv, default_call_conv: Call
47
47
}
48
48
49
49
Conv :: X86Intr | Conv :: RiscvInterrupt { .. } => {
50
- sess. fatal ( format ! ( "interrupt call conv {c:?} not yet implemented" ) )
50
+ sess. dcx ( ) . fatal ( format ! ( "interrupt call conv {c:?} not yet implemented" ) )
51
51
}
52
52
53
- Conv :: ArmAapcs => sess. fatal ( "aapcs call conv not yet implemented" ) ,
53
+ Conv :: ArmAapcs => sess. dcx ( ) . fatal ( "aapcs call conv not yet implemented" ) ,
54
54
Conv :: CCmseNonSecureCall => {
55
- sess. fatal ( "C-cmse-nonsecure-call call conv is not yet implemented" ) ;
55
+ sess. dcx ( ) . fatal ( "C-cmse-nonsecure-call call conv is not yet implemented" ) ;
56
56
}
57
57
58
58
Conv :: Msp430Intr
@@ -88,10 +88,10 @@ pub(crate) fn import_function<'tcx>(
88
88
let sig = get_function_sig ( tcx, module. target_config ( ) . default_call_conv , inst) ;
89
89
match module. declare_function ( name, Linkage :: Import , & sig) {
90
90
Ok ( func_id) => func_id,
91
- Err ( ModuleError :: IncompatibleDeclaration ( _) ) => tcx. sess . fatal ( format ! (
91
+ Err ( ModuleError :: IncompatibleDeclaration ( _) ) => tcx. dcx ( ) . fatal ( format ! (
92
92
"attempt to declare `{name}` as function, but it was already declared as static"
93
93
) ) ,
94
- Err ( ModuleError :: IncompatibleSignature ( _, prev_sig, new_sig) ) => tcx. sess . fatal ( format ! (
94
+ Err ( ModuleError :: IncompatibleSignature ( _, prev_sig, new_sig) ) => tcx. dcx ( ) . fatal ( format ! (
95
95
"attempt to declare `{name}` with signature {new_sig:?}, \
96
96
but it was already declared with signature {prev_sig:?}"
97
97
) ) ,
@@ -181,7 +181,7 @@ fn make_local_place<'tcx>(
181
181
is_ssa : bool ,
182
182
) -> CPlace < ' tcx > {
183
183
if layout. is_unsized ( ) {
184
- fx. tcx . sess . span_fatal (
184
+ fx. tcx . dcx ( ) . span_fatal (
185
185
fx. mir . local_decls [ local] . source_info . span ,
186
186
"unsized locals are not yet supported" ,
187
187
) ;
@@ -226,7 +226,7 @@ pub(crate) fn codegen_fn_prelude<'tcx>(fx: &mut FunctionCx<'_, '_, 'tcx>, start_
226
226
227
227
// FIXME implement variadics in cranelift
228
228
if fn_abi. c_variadic {
229
- fx. tcx . sess . span_fatal (
229
+ fx. tcx . dcx ( ) . span_fatal (
230
230
fx. mir . span ,
231
231
"Defining variadic functions is not yet supported by Cranelift" ,
232
232
) ;
@@ -543,7 +543,7 @@ pub(crate) fn codegen_terminator_call<'tcx>(
543
543
// FIXME find a cleaner way to support varargs
544
544
if fn_sig. c_variadic ( ) {
545
545
if !matches ! ( fn_sig. abi( ) , Abi :: C { .. } ) {
546
- fx. tcx . sess . span_fatal (
546
+ fx. tcx . dcx ( ) . span_fatal (
547
547
source_info. span ,
548
548
format ! ( "Variadic call for non-C abi {:?}" , fn_sig. abi( ) ) ,
549
549
) ;
@@ -555,7 +555,7 @@ pub(crate) fn codegen_terminator_call<'tcx>(
555
555
let ty = fx. bcx . func . dfg . value_type ( arg) ;
556
556
if !ty. is_int ( ) {
557
557
// FIXME set %al to upperbound on float args once floats are supported
558
- fx. tcx . sess . span_fatal (
558
+ fx. tcx . dcx ( ) . span_fatal (
559
559
source_info. span ,
560
560
format ! ( "Non int ty {:?} for variadic call" , ty) ,
561
561
) ;
0 commit comments