Skip to content

Commit d416cae

Browse files
authoredDec 11, 2024··
[clang][bytecode][NFC] Use Pointer::pointToSameBlock (#119552)
block() requires the pointer to be a block pointer.
1 parent b4b819c commit d416cae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎clang/lib/AST/ByteCode/InterpBuiltin.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1876,7 +1876,7 @@ static bool interp__builtin_memcpy(InterpState &S, CodePtr OpPC,
18761876
}
18771877

18781878
// Check for overlapping memory regions.
1879-
if (!Move && SrcPtr.block() == DestPtr.block()) {
1879+
if (!Move && Pointer::pointToSameBlock(SrcPtr, DestPtr)) {
18801880
unsigned SrcIndex = SrcPtr.getIndex() * SrcPtr.elemSize();
18811881
unsigned DstIndex = DestPtr.getIndex() * DestPtr.elemSize();
18821882
unsigned N = Size.getZExtValue();

0 commit comments

Comments
 (0)
Please sign in to comment.