@@ -393,17 +393,17 @@ void CodeGenFunction::InitializeXteamRedCapturedVars(
393393 Builder.CreateAlloca (RedVarType, nullptr , " d_team_vals" );
394394 Address DTeamValsAddr (DTeamValsInst, RedVarType,
395395 Context.getTypeAlignInChars (RedVarQualType));
396- llvm::Value *NullPtrDTeamVals =
397- llvm::ConstantPointerNull ::get (RedVarType-> getPointerTo ( ));
396+ llvm::Value *NullPtrDTeamVals = llvm::ConstantPointerNull::get (
397+ llvm::PointerType ::get (getLLVMContext (), /* AddressSpace= */ 0 ));
398398 Builder.CreateStore (NullPtrDTeamVals, DTeamValsAddr);
399399
400400 // Placeholder for d_teams_done_ptr initialized to nullptr
401401 llvm::Value *DTeamsDonePtrInst =
402402 Builder.CreateAlloca (Int32Ty, nullptr , " d_teams_done_ptr" );
403403 Address DTeamsDoneAddr (DTeamsDonePtrInst, Int32Ty,
404404 Context.getTypeAlignInChars (Context.UnsignedIntTy ));
405- llvm::Value *NullPtrDTeamsDone =
406- llvm::ConstantPointerNull ::get (Int32Ty-> getPointerTo ( ));
405+ llvm::Value *NullPtrDTeamsDone = llvm::ConstantPointerNull::get (
406+ llvm::PointerType ::get (getLLVMContext (), /* AddressSpace= */ 0 ));
407407 Builder.CreateStore (NullPtrDTeamsDone, DTeamsDoneAddr);
408408
409409 assert (DTeamValsInst && " Device team vals pointer cannot be null" );
@@ -419,8 +419,8 @@ void CodeGenFunction::InitializeXteamRedCapturedVars(
419419 Address DScanStorageAddr (
420420 DScanStorageInst, RedVarType,
421421 Context.getTypeAlignInChars (Context.UnsignedIntTy ));
422- llvm::Value *NullPtrDScanStorage =
423- llvm::ConstantPointerNull ::get (RedVarType-> getPointerTo ( ));
422+ llvm::Value *NullPtrDScanStorage = llvm::ConstantPointerNull::get (
423+ llvm::PointerType ::get (getLLVMContext (), /* AddressSpace= */ 0 ));
424424 Builder.CreateStore (NullPtrDScanStorage, DScanStorageAddr);
425425
426426 assert (DScanStorageInst && " Device scan storage pointer cannot be null" );
@@ -432,8 +432,8 @@ void CodeGenFunction::InitializeXteamRedCapturedVars(
432432 Address DSegmentValsAddr (
433433 DSegmentValsInst, RedVarType,
434434 Context.getTypeAlignInChars (Context.UnsignedIntTy ));
435- llvm::Value *NullPtrDSegmentVals =
436- llvm::ConstantPointerNull ::get (RedVarType-> getPointerTo ( ));
435+ llvm::Value *NullPtrDSegmentVals = llvm::ConstantPointerNull::get (
436+ llvm::PointerType ::get (getLLVMContext (), /* AddressSpace= */ 0 ));
437437 Builder.CreateStore (NullPtrDSegmentVals, DSegmentValsAddr);
438438
439439 assert (DSegmentValsInst && " Segment Vals Array pointer cannot be null" );
0 commit comments