Commit 4f38f04
committed
Make __CHERI__ a synonym for __CHERI_PURE_CAPABILITY__
WARNING: This is a breaking change for hybrid code bases.
Rationale: We strongly encourage all CHERI consumers to use a
pure-capability ABI whenever possible. Therefore it should be the
easiest thing to type and less preferred options should be longer. The
existing macros date to the earliest compiler support which barely
supported capability types. Before broad adoption of CHERI we should
make the macros be sensible. We're past Stuart Feldman's too many users
of make to change the tabs threshold (12), but few codebases will be
effected, the required changes are simple can be safely performed
without automatic review, and we shouldn't have to live with this aspect
of history forever.
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 166f043 commit 4f38f04
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