Skip to content

Commit 2a65f08

Browse files
authored
[llvm][OpenMPIRBuilderTest] Avoid Type::getPointerTo() (NFC) (#111196)
`llvm::Type::getPointerTo()` is to be deprecated & removed soon.
1 parent e31e6f2 commit 2a65f08

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6887,25 +6887,15 @@ TEST_F(OpenMPIRBuilderTest, EmitOffloadingArraysArguments) {
68876887
OpenMPIRBuilder::TargetDataRTArgs RTArgs;
68886888
OpenMPIRBuilder::TargetDataInfo Info(true, false);
68896889

6890-
auto VoidPtrTy = PointerType::getUnqual(Builder.getContext());
68916890
auto VoidPtrPtrTy = PointerType::getUnqual(Builder.getContext());
6892-
auto Int64Ty = Type::getInt64Ty(Builder.getContext());
68936891
auto Int64PtrTy = PointerType::getUnqual(Builder.getContext());
6894-
auto Array4VoidPtrTy = ArrayType::get(VoidPtrTy, 4);
6895-
auto Array4Int64PtrTy = ArrayType::get(Int64Ty, 4);
6896-
6897-
Info.RTArgs.BasePointersArray =
6898-
ConstantPointerNull::get(Array4VoidPtrTy->getPointerTo(0));
6899-
Info.RTArgs.PointersArray =
6900-
ConstantPointerNull::get(Array4VoidPtrTy->getPointerTo());
6901-
Info.RTArgs.SizesArray =
6902-
ConstantPointerNull::get(Array4Int64PtrTy->getPointerTo());
6903-
Info.RTArgs.MapTypesArray =
6904-
ConstantPointerNull::get(Array4Int64PtrTy->getPointerTo());
6905-
Info.RTArgs.MapNamesArray =
6906-
ConstantPointerNull::get(Array4VoidPtrTy->getPointerTo());
6907-
Info.RTArgs.MappersArray =
6908-
ConstantPointerNull::get(Array4VoidPtrTy->getPointerTo());
6892+
6893+
Info.RTArgs.BasePointersArray = ConstantPointerNull::get(Builder.getPtrTy(0));
6894+
Info.RTArgs.PointersArray = ConstantPointerNull::get(Builder.getPtrTy(0));
6895+
Info.RTArgs.SizesArray = ConstantPointerNull::get(Builder.getPtrTy(0));
6896+
Info.RTArgs.MapTypesArray = ConstantPointerNull::get(Builder.getPtrTy(0));
6897+
Info.RTArgs.MapNamesArray = ConstantPointerNull::get(Builder.getPtrTy(0));
6898+
Info.RTArgs.MappersArray = ConstantPointerNull::get(Builder.getPtrTy(0));
69096899
Info.NumberOfPtrs = 4;
69106900
Info.EmitDebug = false;
69116901
OMPBuilder.emitOffloadingArraysArgument(Builder, RTArgs, Info, false);

0 commit comments

Comments
 (0)