mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:24:33 +01:00
fix(libzigc): workaround LLVM bug
* looks like we get stuck inside this loop? 2078da43e2/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp (L245-L298)
This commit is contained in:
parent
e22bf480aa
commit
e3309aaf4f
1 changed files with 6 additions and 1 deletions
|
|
@ -107,7 +107,12 @@ fn wcsncmp(a: [*:0]const wchar_t, b: [*:0]const wchar_t, max: usize) callconv(.c
|
|||
}
|
||||
|
||||
fn wcpcpy(noalias dst: [*]wchar_t, noalias src: [*:0]const wchar_t) callconv(.c) [*]wchar_t {
|
||||
return wcpncpy(dst, src, std.math.maxInt(usize));
|
||||
const src_slice = std.mem.span(src);
|
||||
@memcpy(dst[0..src_slice.len], src_slice);
|
||||
dst[src_slice.len] = 0;
|
||||
return dst + src_slice.len;
|
||||
// XXX: LLVM bug?
|
||||
// return wcpncpy(dst, src, std.math.maxInt(usize));
|
||||
}
|
||||
|
||||
fn wcpncpy(noalias dst: [*]wchar_t, noalias src: [*:0]const wchar_t, max: usize) callconv(.c) [*]wchar_t {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue