Skip to content

Revert "[clang][ARM][AArch64] Define intrinsics guarded by __has_builtin on all platforms " #137373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

sarnex
Copy link
Member

@sarnex sarnex commented Apr 25, 2025

Reverts #128222

Fails on MSVC.

Copy link

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff HEAD~1 HEAD --extensions h,c,cpp -- clang/lib/Headers/arm_acle.h clang/lib/Sema/SemaARM.cpp clang/test/CodeGen/arm-microsoft-intrinsics.c clang/test/CodeGen/arm64-microsoft-intrinsics.c clang/test/CodeGen/builtins-arm-microsoft.c clang/test/Headers/Inputs/include/stdint.h clang/test/Headers/ms-intrin.cpp
View the diff from clang-format here.
diff --git a/clang/lib/Headers/arm_acle.h b/clang/lib/Headers/arm_acle.h
index aabcbe04d..a7a62b69e 100644
--- a/clang/lib/Headers/arm_acle.h
+++ b/clang/lib/Headers/arm_acle.h
@@ -42,31 +42,36 @@ extern "C" {
 /* 7.4 Hints */
 
 #if !__has_builtin(__wfi)
-static __inline__ void __attribute__((__always_inline__, __nodebug__)) __wfi(void) {
+static __inline__ void __attribute__((__always_inline__, __nodebug__))
+__wfi(void) {
   __builtin_arm_wfi();
 }
 #endif
 
 #if !__has_builtin(__wfe)
-static __inline__ void __attribute__((__always_inline__, __nodebug__)) __wfe(void) {
+static __inline__ void __attribute__((__always_inline__, __nodebug__))
+__wfe(void) {
   __builtin_arm_wfe();
 }
 #endif
 
 #if !__has_builtin(__sev)
-static __inline__ void __attribute__((__always_inline__, __nodebug__)) __sev(void) {
+static __inline__ void __attribute__((__always_inline__, __nodebug__))
+__sev(void) {
   __builtin_arm_sev();
 }
 #endif
 
 #if !__has_builtin(__sevl)
-static __inline__ void __attribute__((__always_inline__, __nodebug__)) __sevl(void) {
+static __inline__ void __attribute__((__always_inline__, __nodebug__))
+__sevl(void) {
   __builtin_arm_sevl();
 }
 #endif
 
 #if !__has_builtin(__yield)
-static __inline__ void __attribute__((__always_inline__, __nodebug__)) __yield(void) {
+static __inline__ void __attribute__((__always_inline__, __nodebug__))
+__yield(void) {
   __builtin_arm_yield();
 }
 #endif

@sarnex sarnex closed this Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant