summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2022-01-11 13:01:28 +0100
committerNikita Popov <npopov@redhat.com>2022-01-11 13:07:02 +0100
commitacc39873b70eae53a0c32ca5073f08ea55bbab1c (patch)
tree2b6cc9c3ad5563ace362a6f68374da132149a3a7
parent3a272d1eaf2679f9fdd7eb49b4e3250d31f0d9a3 (diff)
downloadllvm-acc39873b70eae53a0c32ca5073f08ea55bbab1c.tar.gz
[CodeGen] Avoid deprecated Address constructor
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 2d3b214ca424..640c73f1a556 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -2109,6 +2109,7 @@ llvm::Value *CodeGenFunction::emitArrayLength(const ArrayType *origArrayType,
// Create the actual GEP.
addr = Address(Builder.CreateInBoundsGEP(
addr.getElementType(), addr.getPointer(), gepIndices, "array.begin"),
+ ConvertTypeForMem(eltType),
addr.getAlignment());
}