Author: Timm Bäder Date: 2024-05-14T12:26:05+02:00 New Revision: 5865482049872d3ae52ea5559abb9e8f4a1e55e5
URL: https://github.com/llvm/llvm-project/commit/5865482049872d3ae52ea5559abb9e8f4a1e55e5 DIFF: https://github.com/llvm/llvm-project/commit/5865482049872d3ae52ea5559abb9e8f4a1e55e5.diff LOG: [clang][Interp][NFC] Don't pass on metadata size for composite arrays We don't need the metadata size for every element, just for the topmost descriptor. Added: Modified: clang/lib/AST/Interp/Program.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/Interp/Program.cpp b/clang/lib/AST/Interp/Program.cpp index 6606149f1f697..0b95db8492695 100644 --- a/clang/lib/AST/Interp/Program.cpp +++ b/clang/lib/AST/Interp/Program.cpp @@ -372,7 +372,7 @@ Descriptor *Program::createDescriptor(const DeclTy &D, const Type *Ty, // Arrays of composites. In this case, the array is a list of pointers, // followed by the actual elements. const Descriptor *ElemDesc = createDescriptor( - D, ElemTy.getTypePtr(), MDSize, IsConst, IsTemporary); + D, ElemTy.getTypePtr(), std::nullopt, IsConst, IsTemporary); if (!ElemDesc) return nullptr; unsigned ElemSize = _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits