aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2022-02-22 18:28:32 -0800
committerArthur Eubanks <aeubanks@google.com>2022-02-22 18:28:49 -0800
commit36e335eeb577b6dc559de3a66bc832afae1f56c4 (patch)
tree42efa6b2409323a583c751f637accae28aae3767 /clang/lib/CodeGen/CodeGenFunction.cpp
parent6a0b78af9175af45641c854a88761f284361aaee (diff)
downloadllvm-36e335eeb577b6dc559de3a66bc832afae1f56c4.zip
llvm-36e335eeb577b6dc559de3a66bc832afae1f56c4.tar.gz
llvm-36e335eeb577b6dc559de3a66bc832afae1f56c4.tar.bz2
[clang] Remove Address::deprecated() calls in CodeGenFunction.cpp
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index c4ccc8e..9c3e5d5 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -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() { }