Skip to content

Commit 853caa6

Browse files
committed
[AST] Split FileUnit and its subclasses out of Module.h
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.
1 parent c99facb commit 853caa6

File tree

74 files changed

+904
-805
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+904
-805
lines changed

include/swift/AST/FileUnit.h

Lines changed: 827 additions & 0 deletions
Large diffs are not rendered by default.

include/swift/AST/Module.h

Lines changed: 5 additions & 804 deletions
Large diffs are not rendered by default.

include/swift/ClangImporter/ClangModule.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#ifndef SWIFT_CLANGIMPORTER_CLANGMODULE_H
1717
#define SWIFT_CLANGIMPORTER_CLANGMODULE_H
1818

19-
#include "swift/AST/Module.h"
19+
#include "swift/AST/FileUnit.h"
2020
#include "swift/ClangImporter/ClangImporter.h"
2121
#include "clang/AST/ExternalASTSource.h"
2222

include/swift/Frontend/Frontend.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#include "swift/AST/DiagnosticConsumer.h"
2222
#include "swift/AST/DiagnosticEngine.h"
23+
#include "swift/AST/FileUnit.h"
2324
#include "swift/AST/IRGenOptions.h"
2425
#include "swift/AST/LinkLibrary.h"
2526
#include "swift/AST/Module.h"

include/swift/IDE/IDERequests.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include "swift/AST/ASTTypeIDs.h"
2020
#include "swift/AST/Evaluator.h"
21+
#include "swift/AST/FileUnit.h"
2122
#include "swift/AST/SimpleRequest.h"
2223
#include "swift/IDE/Utils.h"
2324
#include "swift/IDE/IDETypeIDs.h"

include/swift/Serialization/SerializedModuleLoader.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#ifndef SWIFT_SERIALIZATION_MODULELOADER_H
1414
#define SWIFT_SERIALIZATION_MODULELOADER_H
1515

16+
#include "swift/AST/FileUnit.h"
1617
#include "swift/AST/Module.h"
1718
#include "swift/AST/ModuleLoader.h"
1819
#include "llvm/Support/MemoryBuffer.h"

lib/AST/ASTContext.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "swift/AST/DiagnosticEngine.h"
2323
#include "swift/AST/DiagnosticsSema.h"
2424
#include "swift/AST/ExistentialLayout.h"
25+
#include "swift/AST/FileUnit.h"
2526
#include "swift/AST/ForeignErrorConvention.h"
2627
#include "swift/AST/GenericEnvironment.h"
2728
#include "swift/AST/GenericSignature.h"

lib/AST/ASTDumper.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "swift/AST/ASTContext.h"
1818
#include "swift/AST/ASTPrinter.h"
1919
#include "swift/AST/ASTVisitor.h"
20+
#include "swift/AST/FileUnit.h"
2021
#include "swift/AST/ForeignErrorConvention.h"
2122
#include "swift/AST/GenericEnvironment.h"
2223
#include "swift/AST/Initializer.h"

lib/AST/ASTMangler.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "swift/AST/ASTContext.h"
1919
#include "swift/AST/ASTVisitor.h"
2020
#include "swift/AST/ExistentialLayout.h"
21+
#include "swift/AST/FileUnit.h"
2122
#include "swift/AST/GenericSignature.h"
2223
#include "swift/AST/Initializer.h"
2324
#include "swift/AST/LazyResolver.h"

lib/AST/ASTPrinter.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "swift/AST/Comment.h"
2323
#include "swift/AST/Decl.h"
2424
#include "swift/AST/Expr.h"
25+
#include "swift/AST/FileUnit.h"
2526
#include "swift/AST/GenericEnvironment.h"
2627
#include "swift/AST/Module.h"
2728
#include "swift/AST/NameLookup.h"

0 commit comments

Comments
 (0)