Skip to content

Commit 9e552ad

Browse files
committed
Use getTypeSizeInChars
1 parent 245f43d commit 9e552ad

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

clang/lib/CodeGen/CGOpenMPRuntime.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7426,10 +7426,9 @@ class MappableExprsHandler {
74267426
// size
74277427
llvm::Value *PointerSize = CGF.Builder.CreateIntCast(
74287428
llvm::ConstantInt::get(
7429-
CGF.CGM.SizeTy,
7430-
CGF.getContext().getTypeSize(
7431-
CGF.getContext().getPointerType(CGF.getContext().VoidTy)) /
7432-
8),
7429+
CGF.CGM.SizeTy, CGF.getContext()
7430+
.getTypeSizeInChars(CGF.getContext().VoidPtrTy)
7431+
.getQuantity()),
74337432
CGF.Int64Ty, /*isSigned=*/true);
74347433

74357434
CombinedInfo.Exprs.emplace_back(AttachInfo.AttachPtrDecl,

0 commit comments

Comments
 (0)