@@ -312,7 +312,7 @@ impl ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> {
312
312
if layout. value == layout:: Pointer {
313
313
unsafe { llvm:: LLVMConstIntToPtr ( llval, llty) }
314
314
} else {
315
- self . static_bitcast ( llval, llty)
315
+ self . const_bitcast ( llval, llty)
316
316
}
317
317
} ,
318
318
Scalar :: Ptr ( ptr) => {
@@ -336,14 +336,14 @@ impl ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> {
336
336
None => bug ! ( "missing allocation {:?}" , ptr. alloc_id) ,
337
337
} ;
338
338
let llval = unsafe { llvm:: LLVMConstInBoundsGEP (
339
- self . static_bitcast ( base_addr, self . type_i8p ( ) ) ,
339
+ self . const_bitcast ( base_addr, self . type_i8p ( ) ) ,
340
340
& self . const_usize ( ptr. offset . bytes ( ) ) ,
341
341
1 ,
342
342
) } ;
343
343
if layout. value != layout:: Pointer {
344
344
unsafe { llvm:: LLVMConstPtrToInt ( llval, llty) }
345
345
} else {
346
- self . static_bitcast ( llval, llty)
346
+ self . const_bitcast ( llval, llty)
347
347
}
348
348
}
349
349
}
@@ -359,11 +359,11 @@ impl ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> {
359
359
let base_addr = self . static_addr_of ( init, layout. align . abi , None ) ;
360
360
361
361
let llval = unsafe { llvm:: LLVMConstInBoundsGEP (
362
- self . static_bitcast ( base_addr, self . type_i8p ( ) ) ,
362
+ self . const_bitcast ( base_addr, self . type_i8p ( ) ) ,
363
363
& self . const_usize ( offset. bytes ( ) ) ,
364
364
1 ,
365
365
) } ;
366
- let llval = self . static_bitcast ( llval, self . type_ptr_to ( layout. llvm_type ( self ) ) ) ;
366
+ let llval = self . const_bitcast ( llval, self . type_ptr_to ( layout. llvm_type ( self ) ) ) ;
367
367
PlaceRef :: new_sized ( llval, layout, alloc. align )
368
368
}
369
369
0 commit comments