Author: Nikita Popov
Date: 2022-01-11T13:07:02+01:00
New Revision: acc39873b70eae53a0c32ca5073f08ea55bbab1c

URL: 
https://github.com/llvm/llvm-project/commit/acc39873b70eae53a0c32ca5073f08ea55bbab1c
DIFF: 
https://github.com/llvm/llvm-project/commit/acc39873b70eae53a0c32ca5073f08ea55bbab1c.diff

LOG: [CodeGen] Avoid deprecated Address constructor

Added: 
    

Modified: 
    clang/lib/CodeGen/CodeGenFunction.cpp

Removed: 
    


################################################################################
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());
   }
 


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to