@@ -157,12 +157,12 @@ pub fn bin_op_to_fcmp_predicate(op: hir::BinOpKind) -> RealPredicate {
157
157
158
158
pub fn compare_simd_types < ' a , ' ll : ' a , ' tcx : ' ll , Builder : BuilderMethods < ' a , ' ll , ' tcx > > (
159
159
bx : & Builder ,
160
- lhs : <Builder :: CodegenCx as Backend >:: Value ,
161
- rhs : <Builder :: CodegenCx as Backend >:: Value ,
160
+ lhs : <Builder :: CodegenCx as Backend < ' ll > >:: Value ,
161
+ rhs : <Builder :: CodegenCx as Backend < ' ll > >:: Value ,
162
162
t : Ty < ' tcx > ,
163
- ret_ty : <Builder :: CodegenCx as Backend >:: Type ,
163
+ ret_ty : <Builder :: CodegenCx as Backend < ' ll > >:: Type ,
164
164
op : hir:: BinOpKind
165
- ) -> <Builder :: CodegenCx as Backend >:: Value {
165
+ ) -> <Builder :: CodegenCx as Backend < ' ll > >:: Value {
166
166
let signed = match t. sty {
167
167
ty:: Float ( _) => {
168
168
let cmp = bin_op_to_fcmp_predicate ( op) ;
@@ -219,10 +219,10 @@ pub fn unsized_info<'a, 'll: 'a, 'tcx: 'll, Cx: 'a + CodegenMethods<'ll, 'tcx>>(
219
219
/// Coerce `src` to `dst_ty`. `src_ty` must be a thin pointer.
220
220
pub fn unsize_thin_ptr < ' a , ' ll : ' a , ' tcx : ' ll , Bx : BuilderMethods < ' a , ' ll , ' tcx > > (
221
221
bx : & Bx ,
222
- src : <Bx :: CodegenCx as Backend >:: Value ,
222
+ src : <Bx :: CodegenCx as Backend < ' ll > >:: Value ,
223
223
src_ty : Ty < ' tcx > ,
224
224
dst_ty : Ty < ' tcx >
225
- ) -> ( <Bx :: CodegenCx as Backend > :: Value , <Bx :: CodegenCx as Backend >:: Value ) where
225
+ ) -> ( <Bx :: CodegenCx as Backend < ' ll > > :: Value , <Bx :: CodegenCx as Backend < ' ll > >:: Value ) where
226
226
& ' a Bx :: CodegenCx : LayoutOf < Ty = Ty < ' tcx > , TyLayout = TyLayout < ' tcx > > + HasTyCtxt < ' tcx >
227
227
{
228
228
debug ! ( "unsize_thin_ptr: {:?} => {:?}" , src_ty, dst_ty) ;
@@ -276,8 +276,8 @@ pub fn unsize_thin_ptr<'a, 'll: 'a, 'tcx: 'll, Bx: BuilderMethods<'a, 'll, 'tcx>
276
276
/// to a value of type `dst_ty` and store the result in `dst`
277
277
pub fn coerce_unsized_into < ' a , ' ll : ' a , ' tcx : ' ll , Bx : BuilderMethods < ' a , ' ll , ' tcx > > (
278
278
bx : & Bx ,
279
- src : PlaceRef < ' tcx , <Bx :: CodegenCx as Backend >:: Value > ,
280
- dst : PlaceRef < ' tcx , <Bx :: CodegenCx as Backend >:: Value >
279
+ src : PlaceRef < ' tcx , <Bx :: CodegenCx as Backend < ' ll > >:: Value > ,
280
+ dst : PlaceRef < ' tcx , <Bx :: CodegenCx as Backend < ' ll > >:: Value >
281
281
) where & ' a Bx :: CodegenCx : LayoutOf < Ty = Ty < ' tcx > , TyLayout = TyLayout < ' tcx > > + HasTyCtxt < ' tcx >
282
282
{
283
283
let src_ty = src. layout . ty ;
@@ -337,28 +337,28 @@ pub fn coerce_unsized_into<'a, 'll: 'a, 'tcx: 'll, Bx: BuilderMethods<'a, 'll, '
337
337
pub fn cast_shift_expr_rhs < ' a , ' ll : ' a , ' tcx : ' ll , Builder : BuilderMethods < ' a , ' ll , ' tcx > > (
338
338
bx : & Builder ,
339
339
op : hir:: BinOpKind ,
340
- lhs : <Builder :: CodegenCx as Backend >:: Value ,
341
- rhs : <Builder :: CodegenCx as Backend >:: Value
342
- ) -> <Builder :: CodegenCx as Backend >:: Value {
340
+ lhs : <Builder :: CodegenCx as Backend < ' ll > >:: Value ,
341
+ rhs : <Builder :: CodegenCx as Backend < ' ll > >:: Value
342
+ ) -> <Builder :: CodegenCx as Backend < ' ll > >:: Value {
343
343
cast_shift_rhs ( bx, op, lhs, rhs, |a, b| bx. trunc ( a, b) , |a, b| bx. zext ( a, b) )
344
344
}
345
345
346
346
fn cast_shift_rhs < ' a , ' ll : ' a , ' tcx : ' ll , F , G , Builder : BuilderMethods < ' a , ' ll , ' tcx > > (
347
347
bx : & Builder ,
348
348
op : hir:: BinOpKind ,
349
- lhs : <Builder :: CodegenCx as Backend >:: Value ,
350
- rhs : <Builder :: CodegenCx as Backend >:: Value ,
349
+ lhs : <Builder :: CodegenCx as Backend < ' ll > >:: Value ,
350
+ rhs : <Builder :: CodegenCx as Backend < ' ll > >:: Value ,
351
351
trunc : F ,
352
352
zext : G
353
- ) -> <Builder :: CodegenCx as Backend >:: Value
353
+ ) -> <Builder :: CodegenCx as Backend < ' ll > >:: Value
354
354
where F : FnOnce (
355
- <Builder :: CodegenCx as Backend >:: Value ,
356
- <Builder :: CodegenCx as Backend >:: Type
357
- ) -> <Builder :: CodegenCx as Backend >:: Value ,
355
+ <Builder :: CodegenCx as Backend < ' ll > >:: Value ,
356
+ <Builder :: CodegenCx as Backend < ' ll > >:: Type
357
+ ) -> <Builder :: CodegenCx as Backend < ' ll > >:: Value ,
358
358
G : FnOnce (
359
- <Builder :: CodegenCx as Backend >:: Value ,
360
- <Builder :: CodegenCx as Backend >:: Type
361
- ) -> <Builder :: CodegenCx as Backend >:: Value
359
+ <Builder :: CodegenCx as Backend < ' ll > >:: Value ,
360
+ <Builder :: CodegenCx as Backend < ' ll > >:: Type
361
+ ) -> <Builder :: CodegenCx as Backend < ' ll > >:: Value
362
362
{
363
363
// Shifts may have any size int on the rhs
364
364
if op. is_shift ( ) {
@@ -397,16 +397,16 @@ pub fn wants_msvc_seh(sess: &Session) -> bool {
397
397
398
398
pub fn call_assume < ' a , ' ll : ' a , ' tcx : ' ll , Bx : BuilderMethods < ' a , ' ll , ' tcx > > (
399
399
bx : & Bx ,
400
- val : <Bx :: CodegenCx as Backend >:: Value
400
+ val : <Bx :: CodegenCx as Backend < ' ll > >:: Value
401
401
) {
402
402
let assume_intrinsic = bx. cx ( ) . get_intrinsic ( "llvm.assume" ) ;
403
403
bx. call ( assume_intrinsic, & [ val] , None ) ;
404
404
}
405
405
406
406
pub fn from_immediate < ' a , ' ll : ' a , ' tcx : ' ll , Bx : BuilderMethods < ' a , ' ll , ' tcx > > (
407
407
bx : & Bx ,
408
- val : <Bx :: CodegenCx as Backend >:: Value
409
- ) -> <Bx :: CodegenCx as Backend >:: Value {
408
+ val : <Bx :: CodegenCx as Backend < ' ll > >:: Value
409
+ ) -> <Bx :: CodegenCx as Backend < ' ll > >:: Value {
410
410
if bx. cx ( ) . val_ty ( val) == bx. cx ( ) . type_i1 ( ) {
411
411
bx. zext ( val, bx. cx ( ) . type_i8 ( ) )
412
412
} else {
@@ -416,9 +416,9 @@ pub fn from_immediate<'a, 'll: 'a, 'tcx: 'll, Bx : BuilderMethods<'a, 'll ,'tcx>
416
416
417
417
pub fn to_immediate < ' a , ' ll : ' a , ' tcx : ' ll , Builder : BuilderMethods < ' a , ' ll , ' tcx > > (
418
418
bx : & Builder ,
419
- val : <Builder :: CodegenCx as Backend >:: Value ,
419
+ val : <Builder :: CodegenCx as Backend < ' ll > >:: Value ,
420
420
layout : layout:: TyLayout ,
421
- ) -> <Builder :: CodegenCx as Backend >:: Value {
421
+ ) -> <Builder :: CodegenCx as Backend < ' ll > >:: Value {
422
422
if let layout:: Abi :: Scalar ( ref scalar) = layout. abi {
423
423
return to_immediate_scalar ( bx, val, scalar) ;
424
424
}
@@ -427,9 +427,9 @@ pub fn to_immediate<'a, 'll: 'a, 'tcx: 'll, Builder : BuilderMethods<'a, 'll, 't
427
427
428
428
pub fn to_immediate_scalar < ' a , ' ll : ' a , ' tcx : ' ll , Builder : BuilderMethods < ' a , ' ll , ' tcx > > (
429
429
bx : & Builder ,
430
- val : <Builder :: CodegenCx as Backend >:: Value ,
430
+ val : <Builder :: CodegenCx as Backend < ' ll > >:: Value ,
431
431
scalar : & layout:: Scalar ,
432
- ) -> <Builder :: CodegenCx as Backend >:: Value {
432
+ ) -> <Builder :: CodegenCx as Backend < ' ll > >:: Value {
433
433
if scalar. is_bool ( ) {
434
434
return bx. trunc ( val, bx. cx ( ) . type_i1 ( ) ) ;
435
435
}
@@ -438,8 +438,8 @@ pub fn to_immediate_scalar<'a, 'll :'a, 'tcx :'ll, Builder : BuilderMethods<'a,
438
438
439
439
pub fn memcpy_ty < ' a , ' ll : ' a , ' tcx : ' ll , Builder : BuilderMethods < ' a , ' ll , ' tcx > > (
440
440
bx : & Builder ,
441
- dst : <Builder :: CodegenCx as Backend >:: Value ,
442
- src : <Builder :: CodegenCx as Backend >:: Value ,
441
+ dst : <Builder :: CodegenCx as Backend < ' ll > >:: Value ,
442
+ src : <Builder :: CodegenCx as Backend < ' ll > >:: Value ,
443
443
layout : TyLayout < ' tcx > ,
444
444
align : Align ,
445
445
flags : MemFlags ,
0 commit comments