Commit 00f9977
committed
Make __CHERI__ a synonym for __CHERI_PURE_CAPABILITY__
WARNING: This is a breaking change for hybrid code bases.
Rational: We strongly encourage all CHERI consumers to use a
pure-capability ABI whenever possible. In order to do so more firmly,
make __CHERI__ (the shortest macro) a synonym for
__CHERI_PURE_CAPABILITY__ rather than __has_feature(capabilities).
Backwards compatible code transition:
For purecap + standard C/C++ code:
No change required.
For hybrid + standard C/C++ code:
__CHERI__ -> __has_feature(capabilities)
For mixed code:
__CHERI__ -> __has_feature(capabilities)
Once the need for compatability with old compilers is passed further
simplication is possible.
For purecap + standard C/C++ code:
__CHERI_PURE_CAPABILITY__ -> __CHERI__
For hybrid + standard C/C++ code:
__has_feature(capabilities) && !defined(__CHERI_PURE_CAPABILITY__) ->
__CHERI_HYBRID__1 parent 4c706b5 commit 00f9977
File tree
6 files changed
+7
-5
lines changed- clang
- lib/Frontend
- test
- Driver/cheri
- Preprocessor
6 files changed
+7
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
997 | 997 | | |
998 | 998 | | |
999 | 999 | | |
1000 | | - | |
1001 | 1000 | | |
1002 | 1001 | | |
1003 | 1002 | | |
| |||
1012 | 1011 | | |
1013 | 1012 | | |
1014 | 1013 | | |
| 1014 | + | |
| 1015 | + | |
1015 | 1016 | | |
1016 | 1017 | | |
1017 | 1018 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | | - | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
358 | | - | |
359 | 358 | | |
360 | 359 | | |
361 | 360 | | |
| |||
406 | 405 | | |
407 | 406 | | |
408 | 407 | | |
| 408 | + | |
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
| |||
0 commit comments