@@ -57,6 +57,12 @@ using IsFrameworkField = BCFixed<1>;
57
57
using IsSystemField = BCFixed<1 >;
58
58
// / A bit that indicates whether or not a module is that of a static archive
59
59
using IsStaticField = BCFixed<1 >;
60
+ // / A bit taht indicates whether or not a link library is a force-load one
61
+ using IsForceLoadField = BCFixed<1 >;
62
+
63
+ // / Source location fields
64
+ using LineNumberField = BCFixed<32 >;
65
+ using ColumnNumberField = BCFixed<32 >;
60
66
61
67
// / Arrays of various identifiers, distinguished for readability
62
68
using IdentifierIDArryField = llvm::BCArray<IdentifierIDField>;
@@ -65,9 +71,12 @@ using ModuleIDArryField = llvm::BCArray<IdentifierIDField>;
65
71
// / Identifiers used to refer to the above arrays
66
72
using FileIDArrayIDField = IdentifierIDField;
67
73
using ContextHashIDField = IdentifierIDField;
74
+ using ModuleCacheKeyIDField = IdentifierIDField;
68
75
using ImportArrayIDField = IdentifierIDField;
69
76
using FlagIDArrayIDField = IdentifierIDField;
70
77
using DependencyIDArrayIDField = IdentifierIDField;
78
+ using AuxiliaryFilesArrayIDField = IdentifierIDField;
79
+ using SourceLocationIDArrayIDField = IdentifierIDField;
71
80
72
81
// / The ID of the top-level block containing the dependency graph
73
82
const unsigned GRAPH_BLOCK_ID = llvm::bitc::FIRST_APPLICATION_BLOCKID;
@@ -81,6 +90,9 @@ namespace graph_block {
81
90
enum {
82
91
METADATA = 1 ,
83
92
MODULE_NODE,
93
+ LINK_LIBRARY_NODE,
94
+ SOURCE_LOCATION_NODE,
95
+ IMPORT_STATEMENT_NODE,
84
96
SWIFT_INTERFACE_MODULE_DETAILS_NODE,
85
97
SWIFT_SOURCE_MODULE_DETAILS_NODE,
86
98
SWIFT_PLACEHOLDER_MODULE_DETAILS_NODE,
@@ -117,6 +129,26 @@ using IdentifierNodeLayout = BCRecordLayout<IDENTIFIER_NODE, BCBlob>;
117
129
using IdentifierArrayLayout =
118
130
BCRecordLayout<IDENTIFIER_ARRAY_NODE, IdentifierIDArryField>;
119
131
132
+ using LinkLibraryLayout =
133
+ BCRecordLayout<LINK_LIBRARY_NODE, // ID
134
+ IdentifierIDField, // libraryName
135
+ IsFrameworkField, // isFramework
136
+ IsForceLoadField // forceLoad
137
+ >;
138
+
139
+ using SourceLocationLayout =
140
+ BCRecordLayout<LINK_LIBRARY_NODE, // ID
141
+ IdentifierIDField, // bufferIdentifier
142
+ LineNumberField, // lineNumber
143
+ ColumnNumberField // columnNumber
144
+ >;
145
+
146
+ using ImportStatementLayout =
147
+ BCRecordLayout<LINK_LIBRARY_NODE, // ID
148
+ IdentifierIDField, // importIdentifier
149
+ SourceLocationIDArrayIDField // importLocations
150
+ >;
151
+
120
152
// After the array records, we have a sequence of Module info
121
153
// records, each of which is followed by one of:
122
154
// - SwiftInterfaceModuleDetails
@@ -130,7 +162,14 @@ using ModuleInfoLayout =
130
162
ContextHashIDField, // contextHash
131
163
ImportArrayIDField, // moduleImports
132
164
ImportArrayIDField, // optionalModuleImports
133
- DependencyIDArrayIDField // resolvedDirectModuleDependencies
165
+ // ACTODO: LinkLibrariesArrayIDField, // linkLibraries
166
+ DependencyIDArrayIDField, // importedSwiftModules
167
+ DependencyIDArrayIDField, // importedClangModules
168
+ DependencyIDArrayIDField, // crossImportOverlayModules
169
+ DependencyIDArrayIDField, // swiftOverlayDependencies
170
+ ModuleCacheKeyIDField, // moduleCacheKey
171
+ AuxiliaryFilesArrayIDField // auxiliaryFiles
172
+ // ACTODO: MacroDependenciesArrayIDField, // macroDependencies
134
173
>;
135
174
136
175
using SwiftInterfaceModuleDetailsLayout =
@@ -147,7 +186,6 @@ using SwiftInterfaceModuleDetailsLayout =
147
186
FileIDArrayIDField, // sourceFiles
148
187
FileIDArrayIDField, // bridgingSourceFiles
149
188
IdentifierIDField, // bridgingModuleDependencies
150
- DependencyIDArrayIDField, // swiftOverlayDependencies
151
189
IdentifierIDField, // CASFileSystemRootID
152
190
IdentifierIDField, // bridgingHeaderIncludeTree
153
191
IdentifierIDField, // moduleCacheKey
@@ -161,7 +199,6 @@ using SwiftSourceModuleDetailsLayout =
161
199
FileIDArrayIDField, // sourceFiles
162
200
FileIDArrayIDField, // bridgingSourceFiles
163
201
FileIDArrayIDField, // bridgingModuleDependencies
164
- DependencyIDArrayIDField, // swiftOverlayDependencies
165
202
IdentifierIDField, // CASFileSystemRootID
166
203
IdentifierIDField, // bridgingHeaderIncludeTree
167
204
FlagIDArrayIDField, // buildCommandLine
@@ -173,7 +210,6 @@ using SwiftBinaryModuleDetailsLayout =
173
210
FileIDField, // compiledModulePath
174
211
FileIDField, // moduleDocPath
175
212
FileIDField, // moduleSourceInfoPath
176
- DependencyIDArrayIDField, // swiftOverlayDependencies
177
213
FileIDField, // headerImport
178
214
IdentifierIDField, // headerModuleDependencies
179
215
FileIDArrayIDField, // headerSourceFiles
@@ -220,7 +256,7 @@ bool readInterModuleDependenciesCache(llvm::StringRef path,
220
256
// / Returns true if there was an error.
221
257
bool writeInterModuleDependenciesCache (DiagnosticEngine &diags,
222
258
llvm::vfs::OutputBackend &backend,
223
- llvm::StringRef path ,
259
+ llvm::StringRef outputPath ,
224
260
const ModuleDependenciesCache &cache);
225
261
226
262
// / Tries to write out the given dependency cache with the given
0 commit comments