[clang] Remove Address::deprecated() calls in CodeGenFunction.cpp

This commit is contained in:
Arthur Eubanks 2022-02-22 18:28:32 -08:00
parent 6a0b78af91
commit 36e335eeb5
1 changed files with 4 additions and 3 deletions

View File

@ -1103,9 +1103,10 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy,
EI->getType()->getPointerElementType(), &*EI, Idx);
llvm::Type *Ty =
cast<llvm::GetElementPtrInst>(Addr)->getResultElementType();
ReturnValuePointer = Address::deprecated(Addr, getPointerAlign());
ReturnValuePointer = Address(Addr, Ty, getPointerAlign());
Addr = Builder.CreateAlignedLoad(Ty, Addr, getPointerAlign(), "agg.result");
ReturnValue = Address::deprecated(Addr, CGM.getNaturalTypeAlignment(RetTy));
ReturnValue =
Address(Addr, ConvertType(RetTy), CGM.getNaturalTypeAlignment(RetTy));
} else {
ReturnValue = CreateIRTemp(RetTy, "retval");
@ -2481,7 +2482,7 @@ Address CodeGenFunction::EmitFieldAnnotations(const FieldDecl *D,
V = Builder.CreateBitCast(V, VTy);
}
return Address::deprecated(V, Addr.getAlignment());
return Address(V, Addr.getElementType(), Addr.getAlignment());
}
CodeGenFunction::CGCapturedStmtInfo::~CGCapturedStmtInfo() { }