Skip to content

[libc] Add missing stdc_first_trailing_zero_ to stdbit.yaml #128101

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

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

vonosmas
Copy link
Contributor

These declarations were missing in the generated header. Make sure to add them, otherwise <stdbit.h> inclusion fails, since the subsequently included "stdbit-macros.h" expects these declarations to be present.

These declarations were missing in the generated header. Make sure to
add them, otherwise <stdbit.h> inclusion fails, since the subsequently
included "stdbit-macros.h" expects these declarations to be present.
@llvmbot
Copy link
Member

llvmbot commented Feb 21, 2025

@llvm/pr-subscribers-libc

Author: Alexey Samsonov (vonosmas)

Changes

These declarations were missing in the generated header. Make sure to add them, otherwise <stdbit.h> inclusion fails, since the subsequently included "stdbit-macros.h" expects these declarations to be present.


Full diff: https://github.com/llvm/llvm-project/pull/128101.diff

1 Files Affected:

  • (modified) libc/include/stdbit.yaml (+30)
diff --git a/libc/include/stdbit.yaml b/libc/include/stdbit.yaml
index e9bd6b3918e78..8a0ad65c6e8e0 100644
--- a/libc/include/stdbit.yaml
+++ b/libc/include/stdbit.yaml
@@ -245,6 +245,36 @@ functions:
     return_type: unsigned int
     arguments:
       - type: unsigned short
+  - name: stdc_first_trailing_zero_uc
+    standards:
+      - stdc
+    return_type: unsigned int
+    arguments:
+      - type: unsigned char
+  - name: stdc_first_trailing_zero_ui
+    standards:
+      - stdc
+    return_type: unsigned int
+    arguments:
+      - type: unsigned int
+  - name: stdc_first_trailing_zero_ul
+    standards:
+      - stdc
+    return_type: unsigned int
+    arguments:
+      - type: unsigned long
+  - name: stdc_first_trailing_zero_ull
+    standards:
+      - stdc
+    return_type: unsigned int
+    arguments:
+      - type: unsigned long long
+  - name: stdc_first_trailing_zero_us
+    standards:
+      - stdc
+    return_type: unsigned int
+    arguments:
+      - type: unsigned short
   - name: stdc_has_single_bit_uc
     standards:
       - stdc

@vonosmas
Copy link
Contributor Author

CI errors seems to be irrelevant

@vonosmas vonosmas merged commit ad0c7da into llvm:main Feb 21, 2025
16 of 18 checks passed
@vonosmas vonosmas deleted the stdbit-fix branch February 21, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants