@@ -312,7 +312,7 @@ impl ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> {
312312 if layout. value == layout:: Pointer {
313313 unsafe { llvm:: LLVMConstIntToPtr ( llval, llty) }
314314 } else {
315- self . static_bitcast ( llval, llty)
315+ self . const_bitcast ( llval, llty)
316316 }
317317 } ,
318318 Scalar :: Ptr ( ptr) => {
@@ -336,14 +336,14 @@ impl ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> {
336336 None => bug ! ( "missing allocation {:?}" , ptr. alloc_id) ,
337337 } ;
338338 let llval = unsafe { llvm:: LLVMConstInBoundsGEP (
339- self . static_bitcast ( base_addr, self . type_i8p ( ) ) ,
339+ self . const_bitcast ( base_addr, self . type_i8p ( ) ) ,
340340 & self . const_usize ( ptr. offset . bytes ( ) ) ,
341341 1 ,
342342 ) } ;
343343 if layout. value != layout:: Pointer {
344344 unsafe { llvm:: LLVMConstPtrToInt ( llval, llty) }
345345 } else {
346- self . static_bitcast ( llval, llty)
346+ self . const_bitcast ( llval, llty)
347347 }
348348 }
349349 }
@@ -359,11 +359,11 @@ impl ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> {
359359 let base_addr = self . static_addr_of ( init, layout. align . abi , None ) ;
360360
361361 let llval = unsafe { llvm:: LLVMConstInBoundsGEP (
362- self . static_bitcast ( base_addr, self . type_i8p ( ) ) ,
362+ self . const_bitcast ( base_addr, self . type_i8p ( ) ) ,
363363 & self . const_usize ( offset. bytes ( ) ) ,
364364 1 ,
365365 ) } ;
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 ) ) ) ;
367367 PlaceRef :: new_sized ( llval, layout, alloc. align )
368368 }
369369
0 commit comments