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