Most of AST, Parse, and Sema deal with FileUnits regularly, but SIL
and IRGen certainly don't. Split FileUnit out into its own header to
cut down on recompilation times when something changes.
No functionality change.
Unlike compiled modules, swiftdoc files are considered a stable
format, so we can't change how information is stored in them. If we
add any more string-hashed tables to swiftdoc files, we should
consider using a new hash seed for those.
Before:
- call a helper object to get group name info
- which called another helper object to parse group name info (lazily)
- and cached that in a global map
- which was never accessed anywhere else
After:
- just parse the group name info up front
- and look up into it as necessary
No intended functionality change; in practice decls without groups
might now sort to the top where before they'd be "in the middle
somewhere" (wherever the first decl-without-group appeared).
Double-underscored names suggest the symbols aren't supposed to be used by framework
clients. This patch excludes the doc-comments of these symbols in swiftdoc files.
rdar://51468650
The functionality change in this commit is that the control block in a
swiftdoc file is validated rather than just being ignored. Tests in
following commit.