Skip to content

Commit 4a51801

Browse files
oli-obknikic
andauthored
Use dedicated method for getting the type size
Co-Authored-By: Nikita Popov <[email protected]>
1 parent 88b5e94 commit 4a51801

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_codegen_llvm/intrinsic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ impl IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> {
697697

698698
"ptr_offset_from" => {
699699
let ty = substs.type_at(0);
700-
let pointee_size = self.layout_of(ty).size;
700+
let pointee_size = self.size_of(ty);
701701

702702
// This is the same sequence that Clang emits for pointer subtraction.
703703
// It can be neither `nsw` nor `nuw` because the input is treated as

0 commit comments

Comments
 (0)