@@ -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()
https://github.com/tbaederr closed
https://github.com/llvm/llvm-project/pull/119187
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tbaederr updated
https://github.com/llvm/llvm-project/pull/119187
>From d5c3e403c6cc30c897e7b8ada981a0d311ea187c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?=
Date: Sun, 8 Dec 2024 19:12:54 +0100
Subject: [PATCH] [clang][bytecode] Handle __builtin_wcslen
Handl
https://github.com/cor3ntin approved this pull request.
LGTM modulo comment
https://github.com/llvm/llvm-project/pull/119187
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -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()
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/119187
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
Changes
Handle different char widths in builtin_strlen.
---
Full diff: https://github.com/llvm/llvm-project/pull/119187.diff
2 Files Affected:
- (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+18-3)
- (modi
https://github.com/tbaederr created
https://github.com/llvm/llvm-project/pull/119187
Handle different char widths in builtin_strlen.
>From 1048d45d72c8b44211e245228e97b83b36b1c1b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?=
Date: Sun, 8 Dec 2024 19:12:54 +0100
Subject: [PATCH]