From 5379022529e494827a9f784b88ebe9c81d4c4d1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 12 Oct 2025 07:24:04 +0200 Subject: [PATCH] [clang][bytecode][NFC] Avoid creating pointers in CopyArray op --- clang/lib/AST/ByteCode/Interp.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/clang/lib/AST/ByteCode/Interp.h b/clang/lib/AST/ByteCode/Interp.h index bb0c4580b14a9..a9c71c771c9ae 100644 --- a/clang/lib/AST/ByteCode/Interp.h +++ b/clang/lib/AST/ByteCode/Interp.h @@ -3183,9 +3183,8 @@ inline bool CopyArray(InterpState &S, CodePtr OpPC, uint32_t SrcIndex, if (!CheckLoad(S, OpPC, SP)) return false; - const Pointer &DP = DestPtr.atIndex(DestIndex + I); - DP.deref() = SP.deref(); - DP.initialize(); + DestPtr.elem(DestIndex + I) = SrcPtr.elem(SrcIndex + I); + DestPtr.initializeElement(DestIndex + I); } return true; }