@@ -7,7 +7,8 @@ use gccjit::{
77 BinaryOp , Block , ComparisonOp , Context , Function , LValue , Location , RValue , ToRValue , Type ,
88 UnaryOp ,
99} ;
10- use rustc_apfloat:: { ieee, Float , Round , Status } ;
10+ use rustc_apfloat:: { Float , Round , Status , ieee} ;
11+ use rustc_codegen_ssa:: MemFlags ;
1112use rustc_codegen_ssa:: common:: {
1213 AtomicOrdering , AtomicRmwBinOp , IntPredicate , RealPredicate , SynchronizationScope , TypeKind ,
1314} ;
@@ -17,21 +18,20 @@ use rustc_codegen_ssa::traits::{
1718 BackendTypes , BaseTypeCodegenMethods , BuilderMethods , ConstCodegenMethods ,
1819 LayoutTypeCodegenMethods , OverflowOp , StaticBuilderMethods ,
1920} ;
20- use rustc_codegen_ssa:: MemFlags ;
2121use rustc_data_structures:: fx:: FxHashSet ;
2222use rustc_middle:: bug;
2323use rustc_middle:: middle:: codegen_fn_attrs:: CodegenFnAttrs ;
2424use rustc_middle:: ty:: layout:: {
2525 FnAbiError , FnAbiOfHelpers , FnAbiRequest , HasParamEnv , HasTyCtxt , LayoutError , LayoutOfHelpers ,
2626} ;
2727use rustc_middle:: ty:: { Instance , ParamEnv , Ty , TyCtxt } ;
28- use rustc_span:: def_id:: DefId ;
2928use rustc_span:: Span ;
29+ use rustc_span:: def_id:: DefId ;
3030use rustc_target:: abi:: call:: FnAbi ;
3131use rustc_target:: abi:: { self , Align , HasDataLayout , Size , TargetDataLayout , WrappingRange } ;
3232use rustc_target:: spec:: { HasTargetSpec , HasWasmCAbiOpt , Target , WasmCAbi } ;
3333
34- use crate :: common:: { type_is_pointer , SignType , TypeReflection } ;
34+ use crate :: common:: { SignType , TypeReflection , type_is_pointer } ;
3535use crate :: context:: CodegenCx ;
3636use crate :: intrinsic:: llvm;
3737use crate :: type_of:: LayoutGccExt ;
@@ -152,11 +152,14 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
152152 // NOTE: not sure why, but we have the wrong type here.
153153 let int_type = compare_exchange. get_param ( 2 ) . to_rvalue ( ) . get_type ( ) ;
154154 let src = self . context . new_bitcast ( self . location , src, int_type) ;
155- self . context . new_call (
156- self . location ,
157- compare_exchange,
158- & [ dst, expected, src, weak, order, failure_order] ,
159- )
155+ self . context . new_call ( self . location , compare_exchange, & [
156+ dst,
157+ expected,
158+ src,
159+ weak,
160+ order,
161+ failure_order,
162+ ] )
160163 }
161164
162165 pub fn assign ( & self , lvalue : LValue < ' gcc > , value : RValue < ' gcc > ) {
@@ -1079,11 +1082,9 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
10791082 let align = dest. val . align . restrict_for_offset ( dest. layout . field ( self . cx ( ) , 0 ) . size ) ;
10801083 cg_elem. val . store ( self , PlaceRef :: new_sized_aligned ( current_val, cg_elem. layout , align) ) ;
10811084
1082- let next = self . inbounds_gep (
1083- self . backend_type ( cg_elem. layout ) ,
1084- current. to_rvalue ( ) ,
1085- & [ self . const_usize ( 1 ) ] ,
1086- ) ;
1085+ let next = self . inbounds_gep ( self . backend_type ( cg_elem. layout ) , current. to_rvalue ( ) , & [
1086+ self . const_usize ( 1 ) ,
1087+ ] ) ;
10871088 self . llbb ( ) . add_assignment ( self . location , current, next) ;
10881089 self . br ( header_bb) ;
10891090
0 commit comments