Commit faf879a
authored
[clang][lex] Introduce new single-module-parse mode (llvm#135813)
This PR introduces new single-module preprocessing mode. It is very
similar to single-file-parse mode, but has the following differences:
* Single-file mode skips over all inclusion directives, while the
single-module mode skips only over import directives and does resolve
textual inclusion directives.
* Single-file mode enters all branches of a conditional directive with
an undefined identifier, while the single-module enters none of them.
This will be used from the dependency scanner to quickly discover a
subset of modular dependencies of a TU/module. The dependencies aren't
being imported in this mode, but the file-inclusion preprocessor
callback does get invoked.1 parent 1fbf33c commit faf879a
File tree
5 files changed
+134
-9
lines changed- clang
- include/clang
- Lex
- Options
- lib/Lex
- test/Modules
5 files changed
+134
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
155 | 162 | | |
156 | 163 | | |
157 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3482 | 3482 | | |
3483 | 3483 | | |
3484 | 3484 | | |
| 3485 | + | |
| 3486 | + | |
| 3487 | + | |
| 3488 | + | |
3485 | 3489 | | |
3486 | 3490 | | |
3487 | 3491 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2094 | 2094 | | |
2095 | 2095 | | |
2096 | 2096 | | |
2097 | | - | |
| 2097 | + | |
| 2098 | + | |
2098 | 2099 | | |
2099 | | - | |
2100 | | - | |
| 2100 | + | |
| 2101 | + | |
2101 | 2102 | | |
2102 | 2103 | | |
2103 | 2104 | | |
| |||
2405 | 2406 | | |
2406 | 2407 | | |
2407 | 2408 | | |
| 2409 | + | |
| 2410 | + | |
| 2411 | + | |
| 2412 | + | |
2408 | 2413 | | |
2409 | 2414 | | |
2410 | 2415 | | |
2411 | | - | |
| 2416 | + | |
| 2417 | + | |
2412 | 2418 | | |
2413 | 2419 | | |
2414 | 2420 | | |
| |||
3443 | 3449 | | |
3444 | 3450 | | |
3445 | 3451 | | |
| 3452 | + | |
| 3453 | + | |
| 3454 | + | |
| 3455 | + | |
| 3456 | + | |
| 3457 | + | |
| 3458 | + | |
3446 | 3459 | | |
3447 | 3460 | | |
3448 | 3461 | | |
| |||
3497 | 3510 | | |
3498 | 3511 | | |
3499 | 3512 | | |
| 3513 | + | |
| 3514 | + | |
| 3515 | + | |
| 3516 | + | |
| 3517 | + | |
| 3518 | + | |
| 3519 | + | |
3500 | 3520 | | |
3501 | 3521 | | |
3502 | 3522 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
601 | 603 | | |
602 | 604 | | |
603 | 605 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
0 commit comments