mirror of
https://github.com/intel/llvm.git
synced 2026-02-05 13:21:04 +08:00
[CodeGen] Remove some uses of deprecated Address constructor
Remove two stray uses in CodeGenModule and CGCUDANV.
This commit is contained in:
@@ -965,9 +965,9 @@ llvm::Function *CGNVCUDARuntime::makeModuleDtorFunction() {
|
||||
CGBuilderTy DtorBuilder(CGM, Context);
|
||||
DtorBuilder.SetInsertPoint(DtorEntryBB);
|
||||
|
||||
Address GpuBinaryAddr = Address::deprecated(
|
||||
GpuBinaryHandle,
|
||||
CharUnits::fromQuantity( GpuBinaryHandle->getAlignment()));
|
||||
Address GpuBinaryAddr(
|
||||
GpuBinaryHandle, GpuBinaryHandle->getValueType(),
|
||||
CharUnits::fromQuantity(GpuBinaryHandle->getAlignment()));
|
||||
auto *HandleValue = DtorBuilder.CreateLoad(GpuBinaryAddr);
|
||||
// There is only one HIP fat binary per linked module, however there are
|
||||
// multiple destructor functions. Make sure the fat binary is unregistered
|
||||
|
||||
@@ -6456,8 +6456,9 @@ void CodeGenModule::EmitOMPThreadPrivateDecl(const OMPThreadPrivateDecl *D) {
|
||||
!VD->getAnyInitializer()->isConstantInitializer(getContext(),
|
||||
/*ForRef=*/false);
|
||||
|
||||
Address Addr = Address::deprecated(GetAddrOfGlobalVar(VD),
|
||||
getContext().getDeclAlign(VD));
|
||||
Address Addr(GetAddrOfGlobalVar(VD),
|
||||
getTypes().ConvertTypeForMem(VD->getType()),
|
||||
getContext().getDeclAlign(VD));
|
||||
if (auto InitFunction = getOpenMPRuntime().emitThreadPrivateVarDefinition(
|
||||
VD, Addr, RefExpr->getBeginLoc(), PerformInit))
|
||||
CXXGlobalInits.push_back(InitFunction);
|
||||
|
||||
Reference in New Issue
Block a user