2
2
//
3
3
// This source file is part of the Swift.org open source project
4
4
//
5
- // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
5
+ // Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
6
6
// Licensed under Apache License v2.0 with Runtime Library Exception
7
7
//
8
8
// See https://swift.org/LICENSE.txt for license information
9
9
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10
10
//
11
11
// ===----------------------------------------------------------------------===//
12
12
//
13
- // This file defines data structures for capturing module dependencies.
13
+ // This file defines data structures for capturing all of the source files
14
+ // and modules on which a given module depends, forming a graph of all of the
15
+ // modules that need to be present for a given module to be built.
14
16
//
15
17
// ===----------------------------------------------------------------------===//
16
18
#ifndef SWIFT_AST_MODULE_DEPENDENCIES_H
@@ -36,6 +38,8 @@ enum class ModuleDependenciesKind : int8_t {
36
38
};
37
39
38
40
// / Base class for the variant storage of ModuleDependencies.
41
+ // /
42
+ // / This class is mostly an implementation detail for \c ModuleDependencies.
39
43
class ModuleDependenciesStorageBase {
40
44
public:
41
45
const bool isSwiftModule;
@@ -57,6 +61,8 @@ class ModuleDependenciesStorageBase {
57
61
};
58
62
59
63
// / Describes the dependencies of a Swift module.
64
+ // /
65
+ // / This class is mostly an implementation detail for \c ModuleDependencies.
60
66
class SwiftModuleDependenciesStorage : public ModuleDependenciesStorageBase {
61
67
public:
62
68
// / The Swift interface file, if it can be used to generate the module file.
@@ -89,6 +95,9 @@ class SwiftModuleDependenciesStorage : public ModuleDependenciesStorageBase {
89
95
}
90
96
};
91
97
98
+ // / Describes the dependencies of a Clang module.
99
+ // /
100
+ // / This class is mostly an implementation detail for \c ModuleDependencies.
92
101
class ClangModuleDependenciesStorage : public ModuleDependenciesStorageBase {
93
102
public:
94
103
// / The module map file used to generate the Clang module.
@@ -126,6 +135,10 @@ class ClangModuleDependenciesStorage : public ModuleDependenciesStorageBase {
126
135
};
127
136
128
137
// / Describes the dependencies of a given module.
138
+ // /
139
+ // / The dependencies of a module include all of the source files that go
140
+ // / into that module, as well as any modules that are directly imported
141
+ // / into the module.
129
142
class ModuleDependencies {
130
143
private:
131
144
std::unique_ptr<ModuleDependenciesStorageBase> storage;
0 commit comments