Skip to content

Commit 41269e6

Browse files
committed
TBDGen: Merge TBDGen library into IRGen.
The relationship between the code in these two libraries was fundamentally circular, indicating that they should not have been split. With other changes that I'm making to remove circular dependencies from the CMake build graph I eventually uncovered that these two libraries were required to link each other circularly, but that had been hidden by other cycles in the build graph previously.
1 parent b0de482 commit 41269e6

File tree

18 files changed

+22
-39
lines changed

18 files changed

+22
-39
lines changed

include/swift/AST/TBDGenRequests.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
#include "swift/AST/ASTTypeIDs.h"
2121
#include "swift/AST/SimpleRequest.h"
2222
#include "swift/IRGen/Linking.h"
23+
#include "swift/IRGen/TBDGen.h"
2324
#include "swift/SIL/SILDeclRef.h"
24-
#include "swift/TBDGen/TBDGen.h"
2525

2626
namespace llvm {
2727

include/swift/Frontend/Frontend.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,21 @@
3333
#include "swift/Frontend/DiagnosticVerifier.h"
3434
#include "swift/Frontend/FrontendOptions.h"
3535
#include "swift/Frontend/ModuleInterfaceSupport.h"
36+
#include "swift/IRGen/TBDGen.h"
3637
#include "swift/Migrator/MigratorOptions.h"
3738
#include "swift/Parse/CodeCompletionCallbacks.h"
3839
#include "swift/Parse/Parser.h"
3940
#include "swift/Parse/SyntaxParsingCache.h"
4041
#include "swift/Sema/SourceLoader.h"
4142
#include "swift/Serialization/Validation.h"
4243
#include "swift/Subsystems.h"
43-
#include "swift/TBDGen/TBDGen.h"
4444
#include "swift/SymbolGraphGen/SymbolGraphOptions.h"
45+
#include "clang/Basic/FileManager.h"
4546
#include "llvm/ADT/IntrusiveRefCntPtr.h"
4647
#include "llvm/ADT/SetVector.h"
4748
#include "llvm/Option/ArgList.h"
4849
#include "llvm/Support/Host.h"
4950
#include "llvm/Support/MemoryBuffer.h"
50-
#include "clang/Basic/FileManager.h"
5151

5252
#include <memory>
5353

include/swift/TBDGen/TBDGen.h renamed to include/swift/IRGen/TBDGen.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
#ifndef SWIFT_IRGEN_TBDGEN_H
1313
#define SWIFT_IRGEN_TBDGEN_H
1414

15+
#include "swift/Basic/Version.h"
1516
#include "llvm/ADT/Hashing.h"
1617
#include "llvm/ADT/StringSet.h"
17-
#include "swift/Basic/Version.h"
1818
#include <vector>
1919

2020
namespace llvm {

lib/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,5 @@ add_subdirectory(StaticMirror)
5454
add_subdirectory(SymbolGraphGen)
5555
add_subdirectory(Syntax)
5656
add_subdirectory(SyntaxParse)
57-
add_subdirectory(TBDGen)
5857
add_subdirectory(Threading)
5958

lib/Frontend/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ target_link_libraries(swiftFrontend PRIVATE
2727
swiftLocalization
2828
swiftSema
2929
swiftSerialization
30-
swiftTBDGen
3130
swiftAPIDigester)
3231

3332
set_swift_llvm_is_available(swiftFrontend)

lib/FrontendTool/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ target_link_libraries(swiftFrontendTool PRIVATE
2626
swiftSIL
2727
swiftSILGen
2828
swiftSILOptimizer
29-
swiftTBDGen
3029
swiftThreading)
3130

3231
set_swift_llvm_is_available(swiftFrontendTool)

lib/FrontendTool/FrontendTool.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@
2121
//===----------------------------------------------------------------------===//
2222

2323
#include "swift/FrontendTool/FrontendTool.h"
24-
#include "swift/DependencyScan/ScanDependencies.h"
2524
#include "Dependencies.h"
2625
#include "TBD.h"
27-
#include "swift/Subsystems.h"
26+
#include "swift/AST/ASTMangler.h"
2827
#include "swift/AST/DiagnosticsFrontend.h"
2928
#include "swift/AST/DiagnosticsSema.h"
3029
#include "swift/AST/FileSystem.h"
@@ -34,7 +33,6 @@
3433
#include "swift/AST/IRGenOptions.h"
3534
#include "swift/AST/IRGenRequests.h"
3635
#include "swift/AST/NameLookup.h"
37-
#include "swift/AST/ASTMangler.h"
3836
#include "swift/AST/TBDGenRequests.h"
3937
#include "swift/AST/TypeRefinementContext.h"
4038
#include "swift/Basic/Defer.h"
@@ -47,30 +45,31 @@
4745
#include "swift/Basic/PrettyStackTrace.h"
4846
#include "swift/Basic/SourceManager.h"
4947
#include "swift/Basic/Statistic.h"
48+
#include "swift/Basic/TargetInfo.h"
5049
#include "swift/Basic/UUID.h"
5150
#include "swift/Basic/Version.h"
52-
#include "swift/Basic/TargetInfo.h"
5351
#include "swift/ConstExtract/ConstExtract.h"
54-
#include "swift/Option/Options.h"
55-
#include "swift/Frontend/Frontend.h"
52+
#include "swift/DependencyScan/ScanDependencies.h"
5653
#include "swift/Frontend/AccumulatingDiagnosticConsumer.h"
57-
#include "swift/Frontend/PrintingDiagnosticConsumer.h"
58-
#include "swift/Frontend/SerializedDiagnosticConsumer.h"
54+
#include "swift/Frontend/Frontend.h"
5955
#include "swift/Frontend/ModuleInterfaceLoader.h"
6056
#include "swift/Frontend/ModuleInterfaceSupport.h"
57+
#include "swift/Frontend/PrintingDiagnosticConsumer.h"
58+
#include "swift/Frontend/SerializedDiagnosticConsumer.h"
59+
#include "swift/IRGen/TBDGen.h"
6160
#include "swift/Immediate/Immediate.h"
6261
#include "swift/Index/IndexRecord.h"
63-
#include "swift/Option/Options.h"
6462
#include "swift/Migrator/FixitFilter.h"
6563
#include "swift/Migrator/Migrator.h"
64+
#include "swift/Option/Options.h"
6665
#include "swift/PrintAsClang/PrintAsClang.h"
66+
#include "swift/SILOptimizer/PassManager/Passes.h"
6767
#include "swift/Serialization/SerializationOptions.h"
6868
#include "swift/Serialization/SerializedModuleLoader.h"
69-
#include "swift/SILOptimizer/PassManager/Passes.h"
69+
#include "swift/Subsystems.h"
7070
#include "swift/SymbolGraphGen/SymbolGraphOptions.h"
7171
#include "swift/Syntax/Serialization/SyntaxSerialization.h"
7272
#include "swift/Syntax/SyntaxNodes.h"
73-
#include "swift/TBDGen/TBDGen.h"
7473

7574
#include "llvm/ADT/Statistic.h"
7675
#include "llvm/ADT/StringMap.h"

lib/FrontendTool/TBD.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "swift/Basic/LLVM.h"
2222
#include "swift/Demangling/Demangle.h"
2323
#include "swift/Frontend/FrontendOptions.h"
24-
#include "swift/TBDGen/TBDGen.h"
24+
#include "swift/IRGen/TBDGen.h"
2525

2626
#include "llvm/ADT/StringRef.h"
2727
#include "llvm/ADT/StringSet.h"

lib/TBDGen/APIGen.cpp renamed to lib/IRGen/APIGen.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
//
1515
//===----------------------------------------------------------------------===//
1616

17-
1817
#include "llvm/ADT/StringSwitch.h"
1918
#include "llvm/Support/JSON.h"
2019
#include "llvm/Support/raw_ostream.h"
File renamed without changes.

lib/IRGen/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
add_swift_host_library(swiftIRGen STATIC
33
AllocStackHoisting.cpp
4+
APIGen.cpp
45
ClassLayout.cpp
56
DebugTypeInfo.cpp
67
EnumPayload.cpp
@@ -57,6 +58,8 @@ add_swift_host_library(swiftIRGen STATIC
5758
Outlining.cpp
5859
StructLayout.cpp
5960
SwiftTargetInfo.cpp
61+
TBDGen.cpp
62+
TBDGenRequests.cpp
6063
TypeLayout.cpp
6164
TypeLayoutDumper.cpp
6265
TypeLayoutVerifier.cpp

lib/IRGen/IRGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "swift/ClangImporter/ClangModule.h"
3636
#include "swift/IRGen/IRGenPublic.h"
3737
#include "swift/IRGen/IRGenSILPasses.h"
38+
#include "swift/IRGen/TBDGen.h"
3839
#include "swift/LLVMPasses/Passes.h"
3940
#include "swift/LLVMPasses/PassesFwd.h"
4041
#include "swift/SIL/SILModule.h"
@@ -43,7 +44,6 @@
4344
#include "swift/SILOptimizer/PassManager/PassPipeline.h"
4445
#include "swift/SILOptimizer/PassManager/Passes.h"
4546
#include "swift/Subsystems.h"
46-
#include "swift/TBDGen/TBDGen.h"
4747
#include "clang/Basic/TargetInfo.h"
4848
#include "clang/Frontend/CompilerInstance.h"
4949
#include "llvm/ADT/StringSet.h"

lib/TBDGen/TBDGen.cpp renamed to lib/IRGen/TBDGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//
1515
//===----------------------------------------------------------------------===//
1616

17-
#include "swift/TBDGen/TBDGen.h"
17+
#include "swift/IRGen/TBDGen.h"
1818

1919
#include "swift/AST/Availability.h"
2020
#include "swift/AST/ASTMangler.h"

lib/TBDGen/TBDGenRequests.cpp renamed to lib/IRGen/TBDGenRequests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
#include "swift/AST/FileUnit.h"
1717
#include "swift/AST/Module.h"
1818
#include "swift/ClangImporter/ClangImporter.h"
19+
#include "swift/IRGen/TBDGen.h"
1920
#include "swift/Subsystems.h"
20-
#include "swift/TBDGen/TBDGen.h"
2121
#include "clang/Basic/TargetInfo.h"
2222
#include "llvm/TextAPI/InterfaceFile.h"
2323

File renamed without changes.
File renamed without changes.

lib/SILOptimizer/IPO/CrossModuleOptimization.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#define DEBUG_TYPE "cross-module-serialization-setup"
1818
#include "swift/AST/Module.h"
19+
#include "swift/IRGen/TBDGen.h"
1920
#include "swift/SIL/ApplySite.h"
2021
#include "swift/SIL/SILCloner.h"
2122
#include "swift/SIL/SILFunction.h"
@@ -24,7 +25,6 @@
2425
#include "swift/SILOptimizer/PassManager/Transforms.h"
2526
#include "swift/SILOptimizer/Utils/InstOptUtils.h"
2627
#include "swift/SILOptimizer/Utils/SILInliner.h"
27-
#include "swift/TBDGen/TBDGen.h"
2828
#include "llvm/Support/CommandLine.h"
2929
#include "llvm/Support/Debug.h"
3030

lib/TBDGen/CMakeLists.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)