File tree Expand file tree Collapse file tree 6 files changed +24
-22
lines changed Expand file tree Collapse file tree 6 files changed +24
-22
lines changed Original file line number Diff line number Diff line change @@ -2,17 +2,6 @@ include "config/public_api.td"
2
2
3
3
include "spec/stdc.td"
4
4
5
- def NullMacro : MacroDef<"NULL"> {
6
- let Defn = [{
7
- #define __need_NULL
8
- #include <stddef.h>
9
- }];
10
- }
11
-
12
5
def StringAPI : PublicAPI<"string.h"> {
13
6
let Types = ["size_t"];
14
-
15
- let Macros = [
16
- NullMacro,
17
- ];
18
7
}
Original file line number Diff line number Diff line change @@ -36,13 +36,6 @@ def StaticAssertMacro : MacroDef<"static_assert"> {
36
36
}];
37
37
}
38
38
39
- def NullMacro : MacroDef<"NULL"> {
40
- let Defn = [{
41
- #define __need_NULL
42
- #include <stddef.h>
43
- }];
44
- }
45
-
46
39
def AssertAPI : PublicAPI<"assert.h"> {
47
40
let Macros = [
48
41
AssertMacro,
@@ -134,10 +127,6 @@ def FenvAPI: PublicAPI<"fenv.h"> {
134
127
135
128
def StringAPI : PublicAPI<"string.h"> {
136
129
let Types = ["size_t"];
137
-
138
- let Macros = [
139
- NullMacro,
140
- ];
141
130
}
142
131
143
132
def StdIOAPI : PublicAPI<"stdio.h"> {
Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ add_gen_header(
91
91
GEN_HDR string .h
92
92
DEPENDS
93
93
.llvm_libc_common_h
94
+ .llvm-libc-macros.null_macro
94
95
.llvm-libc-types.size_t
95
96
)
96
97
Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ add_header(
6
6
generic-error-number-macros.h
7
7
)
8
8
9
+ add_header (
10
+ null_macro
11
+ HDR
12
+ null-macro.h
13
+ )
14
+
9
15
add_header (
10
16
fcntl_macros
11
17
HDR
Original file line number Diff line number Diff line change
1
+ //===-- Definition of the NULL macro --------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ //===----------------------------------------------------------------------===//
8
+
9
+ #ifndef __LLVM_LIBC_MACROS_NULL_MACRO_H
10
+ #define __LLVM_LIBC_MACROS_NULL_MACRO_H
11
+
12
+ #define __need_NULL
13
+ #include <stddef.h>
14
+
15
+ #endif // __LLVM_LIBC_MACROS_NULL_MACRO_H
Original file line number Diff line number Diff line change 11
11
12
12
#include <__llvm-libc-common.h>
13
13
14
+ #include <llvm-libc-macros/null-macro.h>
15
+
14
16
%%public_api()
15
17
16
18
#endif // LLVM_LIBC_STRING_H
You can’t perform that action at this time.
0 commit comments