@@ -32,12 +32,9 @@ use crate::abi::FnAbiLlvmExt;
3232use crate :: attributes;
3333use crate :: common:: Funclet ;
3434use crate :: context:: { CodegenCx , FullCx , GenericCx , SCx } ;
35- use crate :: llvm:: {
36- self , AtomicOrdering , AtomicRmwBinOp , BasicBlock , False , GEPNoWrapFlags , Metadata , True ,
37- } ;
35+ use crate :: llvm:: { self , BasicBlock , False , GEPNoWrapFlags , Metadata , True , Value } ;
3836use crate :: type_:: Type ;
3937use crate :: type_of:: LayoutLlvmExt ;
40- use crate :: value:: Value ;
4138
4239#[ must_use]
4340pub ( crate ) struct GenericBuilder < ' a , ' ll , CX : Borrow < SCx < ' ll > > > {
@@ -568,7 +565,7 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
568565 ty,
569566 ptr,
570567 UNNAMED ,
571- AtomicOrdering :: from_generic ( order) ,
568+ llvm :: atomic_ordering_from_generic ( order) ,
572569 ) ;
573570 // LLVM requires the alignment of atomic loads to be at least the size of the type.
574571 llvm:: LLVMSetAlignment ( load, size. bytes ( ) as c_uint ) ;
@@ -808,7 +805,7 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
808805 self . llbuilder ,
809806 val,
810807 ptr,
811- AtomicOrdering :: from_generic ( order) ,
808+ llvm :: atomic_ordering_from_generic ( order) ,
812809 ) ;
813810 // LLVM requires the alignment of atomic stores to be at least the size of the type.
814811 llvm:: LLVMSetAlignment ( store, size. bytes ( ) as c_uint ) ;
@@ -1005,12 +1002,12 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
10051002
10061003 /* Comparisons */
10071004 fn icmp ( & mut self , op : IntPredicate , lhs : & ' ll Value , rhs : & ' ll Value ) -> & ' ll Value {
1008- let op = llvm:: IntPredicate :: from_generic ( op) ;
1005+ let op = llvm:: int_predicate_from_generic ( op) ;
10091006 unsafe { llvm:: LLVMBuildICmp ( self . llbuilder , op as c_uint , lhs, rhs, UNNAMED ) }
10101007 }
10111008
10121009 fn fcmp ( & mut self , op : RealPredicate , lhs : & ' ll Value , rhs : & ' ll Value ) -> & ' ll Value {
1013- let op = llvm:: RealPredicate :: from_generic ( op) ;
1010+ let op = llvm:: real_predicate_from_generic ( op) ;
10141011 unsafe { llvm:: LLVMBuildFCmp ( self . llbuilder , op as c_uint , lhs, rhs, UNNAMED ) }
10151012 }
10161013
@@ -1246,8 +1243,8 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
12461243 dst,
12471244 cmp,
12481245 src,
1249- AtomicOrdering :: from_generic ( order) ,
1250- AtomicOrdering :: from_generic ( failure_order) ,
1246+ llvm :: atomic_ordering_from_generic ( order) ,
1247+ llvm :: atomic_ordering_from_generic ( failure_order) ,
12511248 llvm:: False , // SingleThreaded
12521249 ) ;
12531250 llvm:: LLVMSetWeak ( value, weak) ;
@@ -1273,10 +1270,10 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
12731270 let mut res = unsafe {
12741271 llvm:: LLVMBuildAtomicRMW (
12751272 self . llbuilder ,
1276- AtomicRmwBinOp :: from_generic ( op) ,
1273+ llvm :: atomic_rmw_bin_op_from_generic ( op) ,
12771274 dst,
12781275 src,
1279- AtomicOrdering :: from_generic ( order) ,
1276+ llvm :: atomic_ordering_from_generic ( order) ,
12801277 llvm:: False , // SingleThreaded
12811278 )
12821279 } ;
@@ -1298,7 +1295,7 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
12981295 unsafe {
12991296 llvm:: LLVMBuildFence (
13001297 self . llbuilder ,
1301- AtomicOrdering :: from_generic ( order) ,
1298+ llvm :: atomic_ordering_from_generic ( order) ,
13021299 single_threaded,
13031300 UNNAMED ,
13041301 ) ;
0 commit comments