@@ -426,13 +426,13 @@ pub fn trans_intrinsic_call<'a>(mut bcx: &'a Block<'a>, node: ast::NodeId,
426
426
assert ! ( split. len( ) >= 2 , "Atomic intrinsic not correct format" ) ;
427
427
428
428
let order = if split. len ( ) == 2 {
429
- lib :: llvm:: SequentiallyConsistent
429
+ llvm:: SequentiallyConsistent
430
430
} else {
431
431
match * split. get ( 2 ) {
432
- "relaxed" => lib :: llvm:: Monotonic ,
433
- "acq" => lib :: llvm:: Acquire ,
434
- "rel" => lib :: llvm:: Release ,
435
- "acqrel" => lib :: llvm:: AcquireRelease ,
432
+ "relaxed" => llvm:: Monotonic ,
433
+ "acq" => llvm:: Acquire ,
434
+ "rel" => llvm:: Release ,
435
+ "acqrel" => llvm:: AcquireRelease ,
436
436
_ => ccx. sess ( ) . fatal ( "unknown ordering in atomic intrinsic" )
437
437
}
438
438
} ;
@@ -443,23 +443,23 @@ pub fn trans_intrinsic_call<'a>(mut bcx: &'a Block<'a>, node: ast::NodeId,
443
443
// of this, I assume that it's good enough for us to use for
444
444
// now.
445
445
let strongest_failure_ordering = match order {
446
- lib :: llvm:: NotAtomic | lib :: llvm:: Unordered =>
446
+ llvm:: NotAtomic | llvm:: Unordered =>
447
447
ccx. sess ( ) . fatal ( "cmpxchg must be atomic" ) ,
448
448
449
- lib :: llvm:: Monotonic | lib :: llvm:: Release =>
450
- lib :: llvm:: Monotonic ,
449
+ llvm:: Monotonic | llvm:: Release =>
450
+ llvm:: Monotonic ,
451
451
452
- lib :: llvm:: Acquire | lib :: llvm:: AcquireRelease =>
453
- lib :: llvm:: Acquire ,
452
+ llvm:: Acquire | llvm:: AcquireRelease =>
453
+ llvm:: Acquire ,
454
454
455
- lib :: llvm:: SequentiallyConsistent =>
456
- lib :: llvm:: SequentiallyConsistent
455
+ llvm:: SequentiallyConsistent =>
456
+ llvm:: SequentiallyConsistent
457
457
} ;
458
458
459
459
let res = AtomicCmpXchg ( bcx, * llargs. get ( 0 ) , * llargs. get ( 1 ) ,
460
460
* llargs. get ( 2 ) , order,
461
461
strongest_failure_ordering) ;
462
- if unsafe { lib :: llvm :: llvm:: LLVMVersionMinor ( ) >= 5 } {
462
+ if unsafe { llvm:: LLVMVersionMinor ( ) >= 5 } {
463
463
ExtractValue ( bcx, res, 0 )
464
464
} else {
465
465
res
@@ -482,17 +482,17 @@ pub fn trans_intrinsic_call<'a>(mut bcx: &'a Block<'a>, node: ast::NodeId,
482
482
// These are all AtomicRMW ops
483
483
op => {
484
484
let atom_op = match op {
485
- "xchg" => lib :: llvm:: Xchg ,
486
- "xadd" => lib :: llvm:: Add ,
487
- "xsub" => lib :: llvm:: Sub ,
488
- "and" => lib :: llvm:: And ,
489
- "nand" => lib :: llvm:: Nand ,
490
- "or" => lib :: llvm:: Or ,
491
- "xor" => lib :: llvm:: Xor ,
492
- "max" => lib :: llvm:: Max ,
493
- "min" => lib :: llvm:: Min ,
494
- "umax" => lib :: llvm:: UMax ,
495
- "umin" => lib :: llvm:: UMin ,
485
+ "xchg" => llvm:: Xchg ,
486
+ "xadd" => llvm:: Add ,
487
+ "xsub" => llvm:: Sub ,
488
+ "and" => llvm:: And ,
489
+ "nand" => llvm:: Nand ,
490
+ "or" => llvm:: Or ,
491
+ "xor" => llvm:: Xor ,
492
+ "max" => llvm:: Max ,
493
+ "min" => llvm:: Min ,
494
+ "umax" => llvm:: UMax ,
495
+ "umin" => llvm:: UMin ,
496
496
_ => ccx. sess ( ) . fatal ( "unknown atomic operation" )
497
497
} ;
498
498
0 commit comments