[libc-commits] [libc] [libc] quick fix for aarch64 jmpbuf build (PR #101357)
via libc-commits
libc-commits at lists.llvm.org
Wed Jul 31 09:17:33 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Schrodinger ZHU Yifan (SchrodingerZhu)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/101357.diff
2 Files Affected:
- (modified) libc/src/setjmp/aarch64/longjmp.cpp (+3-1)
- (modified) libc/src/setjmp/aarch64/setjmp.cpp (+2-1)
``````````diff
diff --git a/libc/src/setjmp/aarch64/longjmp.cpp b/libc/src/setjmp/aarch64/longjmp.cpp
index 3207cf40368c4..fbb86524e3951 100644
--- a/libc/src/setjmp/aarch64/longjmp.cpp
+++ b/libc/src/setjmp/aarch64/longjmp.cpp
@@ -22,7 +22,9 @@ namespace LIBC_NAMESPACE_DECL {
// supports the MTE instructions, not whether the compiler is configured to use
// them.)
-[[gnu::naked]] LLVM_LIBC_FUNCTION(void, longjmp, (__jmp_buf * buf, int val)) {
+[[gnu::naked]] LLVM_LIBC_FUNCTION(void, longjmp,
+ ([[maybe_unused]] __jmp_buf * buf,
+ [[maybe_unused]] int val)) {
// If BTI branch protection is in use, the compiler will automatically insert
// a BTI here, so we don't need to make any extra effort to do so.
diff --git a/libc/src/setjmp/aarch64/setjmp.cpp b/libc/src/setjmp/aarch64/setjmp.cpp
index ba4dd645eaaa3..90e49be49a8fc 100644
--- a/libc/src/setjmp/aarch64/setjmp.cpp
+++ b/libc/src/setjmp/aarch64/setjmp.cpp
@@ -12,7 +12,8 @@
namespace LIBC_NAMESPACE_DECL {
-[[gnu::naked]] LLVM_LIBC_FUNCTION(int, setjmp, (__jmp_buf * buf)) {
+[[gnu::naked]] LLVM_LIBC_FUNCTION(int, setjmp,
+ ([[maybe_unused]] __jmp_buf * buf)) {
// If BTI branch protection is in use, the compiler will automatically insert
// a BTI here, so we don't need to make any extra effort to do so.
``````````
</details>
https://github.com/llvm/llvm-project/pull/101357
More information about the libc-commits
mailing list