Keep track of source files created for macro expansions and such.

Introduce a new source file kind to describe source files for macro
expansions, and include the macro expression that they expand. This
establishes a "parent" relationship

Also track every kind of auxiliary source file---whether for macro
expansions or other reasons---that is introduced into a module, adding
an operation that allows us to find the source file that contains a
given source location.
This commit is contained in:
Doug Gregor
2022-10-29 22:11:56 -07:00
parent 60c8b4b178
commit 0cb2746c49
14 changed files with 198 additions and 7 deletions

View File

@@ -788,6 +788,7 @@ addDistributedActorCodableConformance(
case SourceFileKind::Library:
case SourceFileKind::Main:
case SourceFileKind::MacroExpansion:
case SourceFileKind::SIL:
break;
}