[all-commits] [llvm/llvm-project] 484089: [libc] implement `memalignment` (#132493)

Mohamed Emad via All-commits all-commits at lists.llvm.org
Fri Mar 28 16:08:18 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 48408954670e1f564bd92eed6b54bf155238201c
      https://github.com/llvm/llvm-project/commit/48408954670e1f564bd92eed6b54bf155238201c
  Author: Mohamed Emad <73320969+hulxv at users.noreply.github.com>
  Date:   2025-03-28 (Fri, 28 Mar 2025)

  Changed paths:
    M libc/config/baremetal/aarch64/entrypoints.txt
    M libc/config/darwin/arm/entrypoints.txt
    M libc/config/darwin/x86_64/entrypoints.txt
    M libc/config/gpu/amdgpu/entrypoints.txt
    M libc/config/gpu/nvptx/entrypoints.txt
    M libc/config/linux/aarch64/entrypoints.txt
    M libc/config/linux/arm/entrypoints.txt
    M libc/config/linux/riscv/entrypoints.txt
    M libc/config/linux/x86_64/entrypoints.txt
    M libc/config/windows/entrypoints.txt
    M libc/include/stdlib.yaml
    M libc/src/stdlib/CMakeLists.txt
    A libc/src/stdlib/memalignment.cpp
    A libc/src/stdlib/memalignment.h
    M libc/test/src/stdlib/CMakeLists.txt
    A libc/test/src/stdlib/memalignment_test.cpp

  Log Message:
  -----------
  [libc] implement `memalignment` (#132493)

This patch adds the `memalignment` function to LLVM-libc, following its
description in [WG14 N3220,
ยง7.24.2.1](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3220.pdf#page=387).

- [x] Add the implementation of `memalignment` in
[`/src/stdlib`](https://github.com/llvm/llvm-project/tree/main/libc/src/stdlib)
- [x] Add tests for `memalignment` in
[`/test/src/stdlib`](https://github.com/llvm/llvm-project/tree/main/libc/test/src/stdlib)
- [x] Add `memalignment` to
[`entrypoints.txt`](https://github.com/llvm/llvm-project/blob/main/libc/config/linux/x86_64/entrypoints.txt)
for at least x86_64 and whatever you're building on
- [x] Add `memalignment` to
[`include/stdlib.yaml`](https://github.com/llvm/llvm-project/blob/main/libc/include/stdlib.yaml)




Closes #132300

---------

Co-authored-by: Joseph Huber <huberjn at outlook.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list