mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-18 22:03:14 +01:00
Use llvm.memset instead of _d_array_init_i1 and _d_array_init_i8.
This exposes what's happening to LLVM, and memset is probably faster than the runtime functions we were using anyway.
This commit is contained in:
@@ -12,22 +12,6 @@ alias llvm_memcpy_i32 llvm_memcpy;
|
||||
|
||||
// per-element array init routines
|
||||
|
||||
void _d_array_init_i1(bool* a, size_t n, bool v)
|
||||
{
|
||||
auto p = a;
|
||||
auto end = a+n;
|
||||
while (p !is end)
|
||||
*p++ = v;
|
||||
}
|
||||
|
||||
void _d_array_init_i8(ubyte* a, size_t n, ubyte v)
|
||||
{
|
||||
auto p = a;
|
||||
auto end = a+n;
|
||||
while (p !is end)
|
||||
*p++ = v;
|
||||
}
|
||||
|
||||
void _d_array_init_i16(ushort* a, size_t n, ushort v)
|
||||
{
|
||||
auto p = a;
|
||||
|
||||
Reference in New Issue
Block a user