Commit 1bafc75
committed
[clang] NFCI: Clean up
The `CompilerInstance::createSourceManager()` function currently accepts
the `FileManager` to be used. However, all clients call
`CompilerInstance::createFileManager()` prior to creating the
`SourceManager`, and it never makes sense to use a `FileManager` in the
`SourceManager` that's different from the rest of the compiler. Passing
the `FileManager` explicitly is redundant, error-prone, and deviates
from the style of other `CompilerInstance` initialization APIs.
This PR therefore removes the `FileManager` parameter from
`createSourceManager()` and also stops returning the `FileManager`
pointer from `createFileManager()`, since that was its primary use. Now,
`createSourceManager()` internally calls `getFileManager()` instead.CompilerInstance::create{File,Source}Manager() (llvm#160748)1 parent 846b9e6 commit 1bafc75
File tree
15 files changed
+34
-35
lines changed- clang-tools-extra
- clang-include-fixer
- include-cleaner/unittests
- clang
- include/clang/Frontend
- lib
- ExtractAPI
- Frontend
- Testing
- Tooling
- DependencyScanning
- tools/clang-import-test
- unittests
- CodeGen
- Serialization
- Tooling/DependencyScanning
- lldb/source/Plugins/ExpressionParser/Clang
15 files changed
+34
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
628 | 628 | | |
629 | 629 | | |
630 | 630 | | |
631 | | - | |
| 631 | + | |
| 632 | + | |
632 | 633 | | |
633 | 634 | | |
634 | | - | |
635 | | - | |
| 635 | + | |
| 636 | + | |
636 | 637 | | |
637 | 638 | | |
638 | 639 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
755 | 755 | | |
756 | 756 | | |
757 | 757 | | |
758 | | - | |
759 | | - | |
760 | | - | |
| 758 | + | |
761 | 759 | | |
762 | 760 | | |
763 | | - | |
| 761 | + | |
764 | 762 | | |
765 | 763 | | |
766 | 764 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
447 | | - | |
448 | | - | |
| 447 | + | |
449 | 448 | | |
450 | 449 | | |
451 | 450 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
401 | | - | |
| 401 | + | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
405 | 404 | | |
406 | 405 | | |
407 | 406 | | |
408 | 407 | | |
409 | | - | |
410 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
411 | 413 | | |
412 | 414 | | |
413 | 415 | | |
| |||
1418 | 1420 | | |
1419 | 1421 | | |
1420 | 1422 | | |
1421 | | - | |
| 1423 | + | |
1422 | 1424 | | |
1423 | 1425 | | |
1424 | 1426 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
919 | 919 | | |
920 | 920 | | |
921 | 921 | | |
922 | | - | |
| 922 | + | |
923 | 923 | | |
924 | 924 | | |
925 | 925 | | |
| |||
1011 | 1011 | | |
1012 | 1012 | | |
1013 | 1013 | | |
1014 | | - | |
1015 | | - | |
1016 | | - | |
1017 | | - | |
1018 | | - | |
| 1014 | + | |
| 1015 | + | |
1019 | 1016 | | |
1020 | | - | |
| 1017 | + | |
1021 | 1018 | | |
1022 | 1019 | | |
1023 | 1020 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
601 | | - | |
| 601 | + | |
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
609 | | - | |
| 609 | + | |
| 610 | + | |
610 | 611 | | |
611 | 612 | | |
612 | 613 | | |
613 | 614 | | |
614 | 615 | | |
615 | | - | |
| 616 | + | |
| 617 | + | |
616 | 618 | | |
617 | 619 | | |
618 | 620 | | |
619 | 621 | | |
620 | 622 | | |
621 | 623 | | |
622 | 624 | | |
623 | | - | |
| 625 | + | |
624 | 626 | | |
625 | 627 | | |
626 | 628 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
460 | | - | |
| 460 | + | |
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
| |||
0 commit comments