Skip to content

[libc][complex] Add complex.yaml in hdrgen. #119609

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
Dec 11, 2024
Merged

Conversation

Sh0g0-1758
Copy link
Member

No description provided.

@llvmbot llvmbot added the libc label Dec 11, 2024
@Sh0g0-1758 Sh0g0-1758 requested a review from lntue December 11, 2024 20:20
@llvmbot
Copy link
Member

llvmbot commented Dec 11, 2024

@llvm/pr-subscribers-libc

Author: Shourya Goel (Sh0g0-1758)

Changes

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

5 Files Affected:

  • (modified) libc/config/linux/aarch64/headers.txt (+1)
  • (modified) libc/config/linux/arm/headers.txt (+1)
  • (modified) libc/config/linux/riscv/headers.txt (+1)
  • (modified) libc/config/linux/x86_64/headers.txt (+1)
  • (added) libc/hdrgen/yaml/complex.yaml (+105)
diff --git a/libc/config/linux/aarch64/headers.txt b/libc/config/linux/aarch64/headers.txt
index f98af5744685fc..05f15a0e4e5cbb 100644
--- a/libc/config/linux/aarch64/headers.txt
+++ b/libc/config/linux/aarch64/headers.txt
@@ -1,5 +1,6 @@
 set(TARGET_PUBLIC_HEADERS
     libc.include.assert
+    libc.include.complex
     libc.include.ctype
     libc.include.dlfcn
     libc.include.elf
diff --git a/libc/config/linux/arm/headers.txt b/libc/config/linux/arm/headers.txt
index 6576db1f852691..9aabac5dea33cb 100644
--- a/libc/config/linux/arm/headers.txt
+++ b/libc/config/linux/arm/headers.txt
@@ -1,4 +1,5 @@
 set(TARGET_PUBLIC_HEADERS
+    libc.include.complex
     libc.include.ctype
     libc.include.errno
     libc.include.fenv
diff --git a/libc/config/linux/riscv/headers.txt b/libc/config/linux/riscv/headers.txt
index 41c343f71998b9..b38659e0b8daf7 100644
--- a/libc/config/linux/riscv/headers.txt
+++ b/libc/config/linux/riscv/headers.txt
@@ -1,5 +1,6 @@
 set(TARGET_PUBLIC_HEADERS
     libc.include.assert
+    libc.include.complex
     libc.include.ctype
     libc.include.dirent
     libc.include.dlfcn
diff --git a/libc/config/linux/x86_64/headers.txt b/libc/config/linux/x86_64/headers.txt
index e0c04b381492d0..8750100302ea7e 100644
--- a/libc/config/linux/x86_64/headers.txt
+++ b/libc/config/linux/x86_64/headers.txt
@@ -1,5 +1,6 @@
 set(TARGET_PUBLIC_HEADERS
     libc.include.assert
+    libc.include.complex
     libc.include.ctype
     libc.include.dirent
     libc.include.dlfcn
diff --git a/libc/hdrgen/yaml/complex.yaml b/libc/hdrgen/yaml/complex.yaml
new file mode 100644
index 00000000000000..be0d3c9ae59b47
--- /dev/null
+++ b/libc/hdrgen/yaml/complex.yaml
@@ -0,0 +1,105 @@
+header: complex.h
+macros: []
+types:
+  - type_name: cfloat16
+  - type_name: cfloat128
+  - type_name: float128
+enums: []
+objects: []
+functions:
+  - name: cimag
+    standards:
+      - stdc
+    return_type: double
+    arguments:
+      - type: _Complex double
+  - name: cimagf
+    standards:
+      - stdc
+    return_type: float
+    arguments:
+      - type: _Complex float
+  - name: cimagl
+    standards:
+      - stdc
+    return_type: long double
+    arguments:
+      - type: _Complex long double
+  - name: cimagf16
+    standards:
+      - stdc
+    return_type: _Float16
+    arguments:
+      - type: cfloat16
+    guard: LIBC_TYPES_HAS_CFLOAT16
+  - name: cimagf128
+    standards:
+      - stdc
+    return_type: float128
+    arguments:
+      - type: cfloat128
+    guard: LIBC_TYPES_HAS_CFLOAT128
+  - name: creal
+    standards:
+      - stdc
+    return_type: double
+    arguments:
+      - type: _Complex double
+  - name: crealf
+    standards:
+      - stdc
+    return_type: float
+    arguments:
+      - type: _Complex float
+  - name: creall
+    standards:
+      - stdc
+    return_type: long double
+    arguments:
+      - type: _Complex long double
+  - name: crealf16
+    standards:
+      - stdc
+    return_type: _Float16
+    arguments:
+      - type: cfloat16
+    guard: LIBC_TYPES_HAS_CFLOAT16
+  - name: crealf128
+    standards:
+      - stdc
+    return_type: float128
+    arguments:
+      - type: cfloat128
+    guard: LIBC_TYPES_HAS_CFLOAT128
+  - name: conj
+    standards:
+      - stdc
+    return_type: _Complex double
+    arguments:
+      - type: _Complex double
+  - name: conjf
+    standards:
+      - stdc
+    return_type: _Complex float
+    arguments:
+      - type: _Complex float
+  - name: conjl
+    standards:
+      - stdc
+    return_type: _Complex long double
+    arguments:
+      - type: _Complex long double
+  - name: conjf16
+    standards:
+      - stdc
+    return_type: cfloat16
+    arguments:
+      - type: cfloat16
+    guard: LIBC_TYPES_HAS_CFLOAT16
+  - name: conjf128
+    standards:
+      - stdc
+    return_type: cfloat128
+    arguments:
+      - type: cfloat128
+    guard: LIBC_TYPES_HAS_CFLOAT128

@lntue lntue changed the title [libc] add complex.yaml in hdrgen [libc][complex] Add complex.yaml in hdrgen. Dec 11, 2024
@Sh0g0-1758 Sh0g0-1758 merged commit d5b7b97 into llvm:main Dec 11, 2024
11 of 12 checks passed
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