Skip to content

Commit 5379022

Browse files
committed
[clang][bytecode][NFC] Avoid creating pointers in CopyArray op
1 parent 0746ff3 commit 5379022

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clang/lib/AST/ByteCode/Interp.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3183,9 +3183,8 @@ inline bool CopyArray(InterpState &S, CodePtr OpPC, uint32_t SrcIndex,
31833183
if (!CheckLoad(S, OpPC, SP))
31843184
return false;
31853185

3186-
const Pointer &DP = DestPtr.atIndex(DestIndex + I);
3187-
DP.deref<T>() = SP.deref<T>();
3188-
DP.initialize();
3186+
DestPtr.elem<T>(DestIndex + I) = SrcPtr.elem<T>(SrcIndex + I);
3187+
DestPtr.initializeElement(DestIndex + I);
31893188
}
31903189
return true;
31913190
}

0 commit comments

Comments
 (0)