[clang] [clang][bytecode] Handle __builtin_wcslen (PR #119187)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 9 02:39:20 PST 2024
================
@@ -256,15 +256,28 @@ static bool interp__builtin_strlen(InterpState &S, CodePtr OpPC,
return false;
assert(StrPtr.getFieldDesc()->isPrimitiveArray());
-
+ unsigned ElemSize = StrPtr.getFieldDesc()->getElemSize();
size_t Len = 0;
for (size_t I = StrPtr.getIndex();; ++I, ++Len) {
const Pointer &ElemPtr = StrPtr.atIndex(I);
if (!CheckRange(S, OpPC, ElemPtr, AK_Read))
return false;
- uint8_t Val = ElemPtr.deref<uint8_t>();
+ uint32_t Val;
----------------
tbaederr wrote:
Done
https://github.com/llvm/llvm-project/pull/119187
More information about the cfe-commits
mailing list