Commit 950f8a8
authored
[OpenCL] Re-enable corresponding __opencl_* feature macros for OpenCL 2.0 core extensions (#171529)
Commit 423bdb2 removed OpenCL 2.0 __opencl_* feature macros
(https://github.com/llvm/llvm-project/blob/fd73bdd662da/clang/lib/Headers/opencl-c-base.h#L60-L72)
from header and thus they are disabled by default for non-SPIR/SPIRV
targets now.
This PR re-enables them for OpenCL 2.0, and shall restore previous
behavior that these features macros were always defined for OpenCL 2.0
core extensions. After this PR, targets that support OpenCL 2.0 must
enable these feature macros via setSupportedOpenCLOpts API.1 parent 680c20d commit 950f8a8
File tree
3 files changed
+47
-23
lines changed- clang
- include/clang/Basic
- lib/Basic/Targets
- test/Misc
3 files changed
+47
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
| 119 | + | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| 337 | + | |
337 | 338 | | |
| 339 | + | |
338 | 340 | | |
| 341 | + | |
339 | 342 | | |
340 | 343 | | |
341 | 344 | | |
342 | 345 | | |
| 346 | + | |
343 | 347 | | |
344 | 348 | | |
345 | 349 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
172 | 192 | | |
173 | 193 | | |
174 | | - | |
| 194 | + | |
175 | 195 | | |
176 | 196 | | |
177 | 197 | | |
178 | 198 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | 199 | | |
189 | 200 | | |
190 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
191 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
192 | 209 | | |
193 | 210 | | |
194 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
195 | 215 | | |
196 | 216 | | |
0 commit comments