From acc39873b70eae53a0c32ca5073f08ea55bbab1c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 11 Jan 2022 13:01:28 +0100 Subject: [CodeGen] Avoid deprecated Address constructor --- clang/lib/CodeGen/CodeGenFunction.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp') diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 2d3b214..640c73f 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()); } -- cgit v1.1