https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/119552
block() requires the pointer to be a block pointer. >From 254b9ed55904777931f666a30110fd356c595243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbae...@redhat.com> Date: Wed, 11 Dec 2024 13:52:02 +0100 Subject: [PATCH] [clang][bytecode][NFC] Use Pointer::pointToSameBlock block() requires the pointer to be a block pointer. --- clang/lib/AST/ByteCode/InterpBuiltin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/AST/ByteCode/InterpBuiltin.cpp b/clang/lib/AST/ByteCode/InterpBuiltin.cpp index 4fe17ec01906e9..57175da32b31cd 100644 --- a/clang/lib/AST/ByteCode/InterpBuiltin.cpp +++ b/clang/lib/AST/ByteCode/InterpBuiltin.cpp @@ -1876,7 +1876,7 @@ static bool interp__builtin_memcpy(InterpState &S, CodePtr OpPC, } // Check for overlapping memory regions. - if (!Move && SrcPtr.block() == DestPtr.block()) { + if (!Move && Pointer::pointToSameBlock(SrcPtr, DestPtr)) { unsigned SrcIndex = SrcPtr.getIndex() * SrcPtr.elemSize(); unsigned DstIndex = DestPtr.getIndex() * DestPtr.elemSize(); unsigned N = Size.getZExtValue(); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits