Skip to content

Commit 72a2d82

Browse files
authored
[libc] Convert dlfcn.h to pure YAML (#149362)
Remove the unnecessary .h.def file and move all the macro definitions directly into dlfcn.yaml.
1 parent fae8df2 commit 72a2d82

File tree

4 files changed

+25
-49
lines changed

4 files changed

+25
-49
lines changed

libc/include/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ add_header_macro(
6969
../libc/include/dlfcn.yaml
7070
dlfcn.h
7171
DEPENDS
72-
.llvm-libc-macros.dlfcn_macros
7372
.llvm_libc_common_h
7473
)
7574

libc/include/dlfcn.h.def

Lines changed: 0 additions & 17 deletions
This file was deleted.

libc/include/dlfcn.yaml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,34 @@
11
header: dlfcn.h
2-
header_template: dlfcn.h.def
2+
standards:
3+
- posix
34
macros:
5+
# Note that macro values are quoted to keep the integer literals as
6+
# written. Without the quotes, YAML will normalize them to minimal
7+
# decimal, which is less readable for humans seeing the generated header.
48
- macro_name: RTLD_LAZY
5-
macro_header: dlfcn-macros.h
9+
macro_value: "0x00001"
610
- macro_name: RTLD_NOW
7-
macro_header: dlfcn-macros.h
11+
macro_value: "0x00002"
812
- macro_name: RTLD_GLOBAL
9-
macro_header: dlfcn-macros.h
13+
macro_value: "0x00100"
1014
- macro_name: RTLD_LOCAL
11-
macro_header: dlfcn-macros.h
12-
types: []
13-
enums: []
14-
objects: []
15+
macro_value: "0"
16+
- macro_name: RTLD_BINDING_MASK
17+
standards:
18+
- gnu
19+
macro_value: "0x00003"
20+
- macro_name: RTLD_NOLOAD
21+
standards:
22+
- gnu
23+
macro_value: "0x00004"
24+
- macro_name: RTLD_DEEPBIND
25+
standards:
26+
- gnu
27+
macro_value: "0x00008"
28+
- macro_name: RTLD_NODELETE
29+
standards:
30+
- gnu
31+
macro_value: "0x01000"
1532
functions:
1633
- name: dlclose
1734
standards:

libc/include/llvm-libc-macros/dlfcn-macros.h

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)