Skip to content

Commit a736792

Browse files
committed
Make 'ModuleInfo' struct Hashable
1 parent 3e20672 commit a736792

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Sources/SwiftDriver/ExplicitModuleBuilds/InterModuleDependencies/InterModuleDependencyGraph.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ extension ModuleDependencyId: Codable {
8686
}
8787

8888
/// Bridging header
89-
public struct BridgingHeader: Codable {
89+
public struct BridgingHeader: Codable, Hashable {
9090
var path: TextualVirtualPath
9191
/// The source files referenced by the bridging header.
9292
var sourceFiles: [TextualVirtualPath]
@@ -95,7 +95,7 @@ public struct BridgingHeader: Codable {
9595
}
9696

9797
/// Details specific to Swift modules.
98-
public struct SwiftModuleDetails: Codable {
98+
public struct SwiftModuleDetails: Codable, Hashable {
9999
/// The module interface from which this module was built, if any.
100100
public var moduleInterfacePath: TextualVirtualPath?
101101

@@ -141,7 +141,7 @@ public struct SwiftModuleDetails: Codable {
141141
}
142142

143143
/// Details specific to Swift placeholder dependencies.
144-
public struct SwiftPlaceholderModuleDetails: Codable {
144+
public struct SwiftPlaceholderModuleDetails: Codable, Hashable {
145145
/// The path to the .swiftModuleDoc file.
146146
var moduleDocPath: TextualVirtualPath?
147147

@@ -150,7 +150,7 @@ public struct SwiftPlaceholderModuleDetails: Codable {
150150
}
151151

152152
/// Details specific to Swift externally-pre-built modules.
153-
public struct SwiftPrebuiltExternalModuleDetails: Codable {
153+
public struct SwiftPrebuiltExternalModuleDetails: Codable, Hashable {
154154
/// The path to the already-compiled module that must be used instead of
155155
/// generating a job to build this module.
156156
public var compiledModulePath: TextualVirtualPath
@@ -185,7 +185,7 @@ public struct SwiftPrebuiltExternalModuleDetails: Codable {
185185
}
186186

187187
/// Details specific to Clang modules.
188-
public struct ClangModuleDetails: Codable {
188+
public struct ClangModuleDetails: Codable, Hashable {
189189
/// The path to the module map used to build this module.
190190
public var moduleMapPath: TextualVirtualPath
191191

@@ -215,7 +215,7 @@ public struct ClangModuleDetails: Codable {
215215
}
216216
}
217217

218-
public struct ModuleInfo: Codable {
218+
public struct ModuleInfo: Codable, Hashable {
219219
/// The path for the module.
220220
public var modulePath: TextualVirtualPath
221221

@@ -229,7 +229,7 @@ public struct ModuleInfo: Codable {
229229
public var details: Details
230230

231231
/// Specific details of a particular kind of module.
232-
public enum Details {
232+
public enum Details: Hashable {
233233
/// Swift modules may be built from a module interface, and may have
234234
/// a bridging header.
235235
case swift(SwiftModuleDetails)

0 commit comments

Comments
 (0)