Skip to content

Commit 40c1687

Browse files
committed
[Fast Dependency Scanner] Produce information on whether an explicit module is a framework
In the fast dependency scanner, depending on whether a module intrface was found via the import search path or framework search path, encode into the dependency graph Swift module details, whether a given module is a framework.
1 parent 0d25abc commit 40c1687

15 files changed

+117
-54
lines changed

include/swift/AST/ModuleDependencies.h

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ class SwiftModuleDependenciesStorage : public ModuleDependenciesStorageBase {
107107
/// The hash value that will be used for the generated module
108108
const std::string contextHash;
109109

110+
/// A flag that indicates this dependency is a framework
111+
const bool isFramework;
112+
110113
/// Bridging header file, if there is one.
111114
Optional<std::string> bridgingHeaderFile;
112115

@@ -125,15 +128,16 @@ class SwiftModuleDependenciesStorage : public ModuleDependenciesStorageBase {
125128
ArrayRef<std::string> compiledModuleCandidates,
126129
ArrayRef<StringRef> buildCommandLine,
127130
ArrayRef<StringRef> extraPCMArgs,
128-
StringRef contextHash
131+
StringRef contextHash,
132+
bool isFramework = false
129133
) : ModuleDependenciesStorageBase(ModuleDependenciesKind::Swift,
130134
compiledModulePath),
131135
swiftInterfaceFile(swiftInterfaceFile),
132136
compiledModuleCandidates(compiledModuleCandidates.begin(),
133137
compiledModuleCandidates.end()),
134138
buildCommandLine(buildCommandLine.begin(), buildCommandLine.end()),
135139
extraPCMArgs(extraPCMArgs.begin(), extraPCMArgs.end()),
136-
contextHash(contextHash) { }
140+
contextHash(contextHash), isFramework(isFramework) { }
137141

138142
ModuleDependenciesStorageBase *clone() const override {
139143
return new SwiftModuleDependenciesStorage(*this);
@@ -242,21 +246,22 @@ class ModuleDependencies {
242246
ArrayRef<std::string> compiledCandidates,
243247
ArrayRef<StringRef> buildCommands,
244248
ArrayRef<StringRef> extraPCMArgs,
245-
StringRef contextHash) {
249+
StringRef contextHash,
250+
bool isFramework) {
246251
std::string compiledModulePath;
247252
return ModuleDependencies(
248253
std::make_unique<SwiftModuleDependenciesStorage>(
249254
compiledModulePath, swiftInterfaceFile, compiledCandidates, buildCommands,
250-
extraPCMArgs, contextHash));
255+
extraPCMArgs, contextHash, isFramework));
251256
}
252257

253258
/// Describe the module dependencies for a serialized or parsed Swift module.
254259
static ModuleDependencies forSwiftModule(
255-
const std::string &compiledModulePath) {
260+
const std::string &compiledModulePath, bool isFramework) {
256261
return ModuleDependencies(
257262
std::make_unique<SwiftModuleDependenciesStorage>(
258263
compiledModulePath, None, ArrayRef<std::string>(), ArrayRef<StringRef>(),
259-
ArrayRef<StringRef>(), StringRef()));
264+
ArrayRef<StringRef>(), StringRef(), isFramework));
260265
}
261266

262267
/// Describe the main Swift module.
@@ -265,7 +270,7 @@ class ModuleDependencies {
265270
return ModuleDependencies(
266271
std::make_unique<SwiftModuleDependenciesStorage>(
267272
compiledModulePath, None, ArrayRef<std::string>(),
268-
ArrayRef<StringRef>(), extraPCMArgs, StringRef()));
273+
ArrayRef<StringRef>(), extraPCMArgs, StringRef(), false));
269274
}
270275

271276
/// Describe the module dependencies for a Clang module that can be

include/swift/Frontend/ModuleInterfaceLoader.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ class ExplicitSwiftModuleLoader: public SerializedModuleLoaderBase {
139139
SmallVectorImpl<char> *ModuleInterfacePath,
140140
std::unique_ptr<llvm::MemoryBuffer> *ModuleBuffer,
141141
std::unique_ptr<llvm::MemoryBuffer> *ModuleDocBuffer,
142-
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer) override;
142+
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer,
143+
bool IsFramework) override;
143144

144145
bool canImportModule(Located<Identifier> mID) override;
145146

@@ -298,12 +299,13 @@ class ModuleInterfaceLoader : public SerializedModuleLoaderBase {
298299
ModuleInterfaceLoaderOptions Opts;
299300

300301
std::error_code findModuleFilesInDirectory(
301-
AccessPathElem ModuleID,
302-
const SerializedModuleBaseName &BaseName,
303-
SmallVectorImpl<char> *ModuleInterfacePath,
304-
std::unique_ptr<llvm::MemoryBuffer> *ModuleBuffer,
305-
std::unique_ptr<llvm::MemoryBuffer> *ModuleDocBuffer,
306-
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer) override;
302+
AccessPathElem ModuleID,
303+
const SerializedModuleBaseName &BaseName,
304+
SmallVectorImpl<char> *ModuleInterfacePath,
305+
std::unique_ptr<llvm::MemoryBuffer> *ModuleBuffer,
306+
std::unique_ptr<llvm::MemoryBuffer> *ModuleDocBuffer,
307+
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer,
308+
bool IsFramework) override;
307309

308310
bool isCached(StringRef DepPath) override;
309311
public:

include/swift/Serialization/SerializedModuleLoader.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ class SerializedModuleLoaderBase : public ModuleLoader {
9898
SmallVectorImpl<char> *ModuleInterfacePath,
9999
std::unique_ptr<llvm::MemoryBuffer> *ModuleBuffer,
100100
std::unique_ptr<llvm::MemoryBuffer> *ModuleDocBuffer,
101-
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer) = 0;
101+
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer,
102+
bool IsFramework) = 0;
102103

103104
std::error_code
104105
openModuleFile(
@@ -229,7 +230,8 @@ class ImplicitSerializedModuleLoader : public SerializedModuleLoaderBase {
229230
SmallVectorImpl<char> *ModuleInterfacePath,
230231
std::unique_ptr<llvm::MemoryBuffer> *ModuleBuffer,
231232
std::unique_ptr<llvm::MemoryBuffer> *ModuleDocBuffer,
232-
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer) override;
233+
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer,
234+
bool IsFramework) override;
233235

234236
bool maybeDiagnoseTargetMismatch(
235237
SourceLoc sourceLocation,
@@ -274,7 +276,8 @@ class MemoryBufferSerializedModuleLoader : public SerializedModuleLoaderBase {
274276
SmallVectorImpl<char> *ModuleInterfacePath,
275277
std::unique_ptr<llvm::MemoryBuffer> *ModuleBuffer,
276278
std::unique_ptr<llvm::MemoryBuffer> *ModuleDocBuffer,
277-
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer) override;
279+
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer,
280+
bool IsFramework) override;
278281

279282
bool maybeDiagnoseTargetMismatch(
280283
SourceLoc sourceLocation,

lib/Frontend/ModuleInterfaceLoader.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,8 @@ std::error_code ModuleInterfaceLoader::findModuleFilesInDirectory(
950950
SmallVectorImpl<char> *ModuleInterfacePath,
951951
std::unique_ptr<llvm::MemoryBuffer> *ModuleBuffer,
952952
std::unique_ptr<llvm::MemoryBuffer> *ModuleDocBuffer,
953-
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer) {
953+
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer,
954+
bool IsFramework) {
954955

955956
// If running in OnlySerialized mode, ModuleInterfaceLoader
956957
// should not have been constructed at all.
@@ -1527,7 +1528,8 @@ std::error_code ExplicitSwiftModuleLoader::findModuleFilesInDirectory(
15271528
SmallVectorImpl<char> *ModuleInterfacePath,
15281529
std::unique_ptr<llvm::MemoryBuffer> *ModuleBuffer,
15291530
std::unique_ptr<llvm::MemoryBuffer> *ModuleDocBuffer,
1530-
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer) {
1531+
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer,
1532+
bool IsFramework) {
15311533
StringRef moduleName = ModuleID.Item.str();
15321534
auto it = Impl.ExplicitModuleMap.find(moduleName);
15331535
// If no explicit module path is given matches the name, return with an

lib/FrontendTool/ScanDependencies.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,13 @@ namespace {
216216
out << "\"";
217217
}
218218

219+
/// Write a boolean value as JSON.
220+
void writeJSONValue(llvm::raw_ostream &out,
221+
bool value,
222+
unsigned indentLevel) {
223+
out.write_escaped(value ? "true" : "false");
224+
}
225+
219226
/// Write a module identifier.
220227
void writeJSONValue(llvm::raw_ostream &out,
221228
const ModuleDependencyID &module,
@@ -397,6 +404,11 @@ static void writeJSON(llvm::raw_ostream &out,
397404
swiftDeps->compiledModulePath, 5,
398405
/*trailingComma=*/false);
399406
}
407+
writeJSONSingleField(
408+
out, "isFramework",
409+
swiftDeps->isFramework, 5,
410+
/*trailingComma=*/!swiftDeps->extraPCMArgs.empty() ||
411+
swiftDeps->bridgingHeaderFile.hasValue());
400412
if (!swiftDeps->extraPCMArgs.empty()) {
401413
out.indent(5 * 2);
402414
out << "\"extraPcmArgs\": [\n";

lib/Serialization/ModuleDependencyScanner.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class ModuleDependencyScanner : public SerializedModuleLoaderBase {
3434

3535
/// Scan the given interface file to determine dependencies.
3636
ErrorOr<ModuleDependencies> scanInterfaceFile(
37-
Twine moduleInterfacePath);
37+
Twine moduleInterfacePath, bool isFramework);
3838

3939
InterfaceSubContextDelegate &astDelegate;
4040
public:
@@ -58,7 +58,8 @@ class ModuleDependencyScanner : public SerializedModuleLoaderBase {
5858
SmallVectorImpl<char> *ModuleInterfacePath,
5959
std::unique_ptr<llvm::MemoryBuffer> *ModuleBuffer,
6060
std::unique_ptr<llvm::MemoryBuffer> *ModuleDocBuffer,
61-
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer) override {
61+
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer,
62+
bool IsFramework) override {
6263
using namespace llvm::sys;
6364

6465
auto &fs = *Ctx.SourceMgr.getFileSystem();
@@ -80,7 +81,7 @@ class ModuleDependencyScanner : public SerializedModuleLoaderBase {
8081
}
8182
}
8283
assert(fs.exists(InPath));
83-
auto dependencies = scanInterfaceFile(InPath);
84+
auto dependencies = scanInterfaceFile(InPath, IsFramework);
8485
if (dependencies) {
8586
this->dependencies = std::move(dependencies.get());
8687
return std::error_code();
@@ -142,7 +143,8 @@ class PlaceholderSwiftModuleScanner : public ModuleDependencyScanner {
142143
SmallVectorImpl<char> *ModuleInterfacePath,
143144
std::unique_ptr<llvm::MemoryBuffer> *ModuleBuffer,
144145
std::unique_ptr<llvm::MemoryBuffer> *ModuleDocBuffer,
145-
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer) override {
146+
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer,
147+
bool IsFramework) override {
146148
StringRef moduleName = ModuleID.Item.str();
147149
auto it = PlaceholderDependencyModuleMap.find(moduleName);
148150
// If no placeholder module stub path is given matches the name, return with an
@@ -172,7 +174,7 @@ static std::vector<std::string> getCompiledCandidates(ASTContext &ctx,
172174
}
173175

174176
ErrorOr<ModuleDependencies> ModuleDependencyScanner::scanInterfaceFile(
175-
Twine moduleInterfacePath) {
177+
Twine moduleInterfacePath, bool isFramework) {
176178
// Create a module filename.
177179
// FIXME: Query the module interface loader to determine an appropriate
178180
// name for the module, which includes an appropriate hash.
@@ -181,6 +183,7 @@ ErrorOr<ModuleDependencies> ModuleDependencyScanner::scanInterfaceFile(
181183
llvm::sys::path::replace_extension(modulePath, newExt);
182184
Optional<ModuleDependencies> Result;
183185
std::error_code code;
186+
184187
auto hasError = astDelegate.runInSubContext(moduleName.str(),
185188
moduleInterfacePath.str(),
186189
StringRef(),
@@ -196,7 +199,8 @@ ErrorOr<ModuleDependencies> ModuleDependencyScanner::scanInterfaceFile(
196199
compiledCandidates,
197200
Args,
198201
PCMArgs,
199-
Hash);
202+
Hash,
203+
isFramework);
200204
// Open the interface file.
201205
auto &fs = *Ctx.SourceMgr.getFileSystem();
202206
auto interfaceBuf = fs.getBufferForFile(moduleInterfacePath);

lib/Serialization/SerializedModuleLoader.cpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ llvm::ErrorOr<ModuleDependencies> SerializedModuleLoaderBase::scanModuleFile(
396396
&extInfo);
397397

398398
// Map the set of dependencies over to the "module dependencies".
399-
auto dependencies = ModuleDependencies::forSwiftModule(modulePath.str());
399+
auto dependencies = ModuleDependencies::forSwiftModule(modulePath.str(), isFramework);
400400
llvm::StringSet<> addedModuleNames;
401401
for (const auto &dependency : loadedModuleFile->getDependencies()) {
402402
// FIXME: Record header dependency?
@@ -422,7 +422,8 @@ std::error_code ImplicitSerializedModuleLoader::findModuleFilesInDirectory(
422422
SmallVectorImpl<char> *ModuleInterfacePath,
423423
std::unique_ptr<llvm::MemoryBuffer> *ModuleBuffer,
424424
std::unique_ptr<llvm::MemoryBuffer> *ModuleDocBuffer,
425-
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer) {
425+
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer,
426+
bool IsFramework) {
426427
assert(((ModuleBuffer && ModuleDocBuffer) ||
427428
(!ModuleBuffer && !ModuleDocBuffer)) &&
428429
"Module and Module Doc buffer must both be initialized or NULL");
@@ -538,7 +539,7 @@ SerializedModuleLoaderBase::findModule(AccessPathElem moduleID,
538539
/// Returns true if a target-specific module file was found, false if an error
539540
/// was diagnosed, or None if neither one happened and the search should
540541
/// continue.
541-
auto findTargetSpecificModuleFiles = [&]() -> Optional<bool> {
542+
auto findTargetSpecificModuleFiles = [&](bool IsFramework) -> Optional<bool> {
542543
Optional<SerializedModuleBaseName> firstAbsoluteBaseName;
543544

544545
for (const auto &targetSpecificBaseName : targetSpecificBaseNames) {
@@ -552,7 +553,8 @@ SerializedModuleLoaderBase::findModule(AccessPathElem moduleID,
552553
absoluteBaseName,
553554
moduleInterfacePath,
554555
moduleBuffer, moduleDocBuffer,
555-
moduleSourceInfoBuffer);
556+
moduleSourceInfoBuffer,
557+
IsFramework);
556558
if (!result) {
557559
return true;
558560
} else if (result == std::errc::not_supported) {
@@ -603,13 +605,13 @@ SerializedModuleLoaderBase::findModule(AccessPathElem moduleID,
603605

604606
if (checkTargetSpecificModule)
605607
// A .swiftmodule directory contains architecture-specific files.
606-
return findTargetSpecificModuleFiles();
608+
return findTargetSpecificModuleFiles(isFramework);
607609

608610
SerializedModuleBaseName absoluteBaseName{currPath, genericBaseName};
609611

610612
auto result = findModuleFilesInDirectory(
611613
moduleID, absoluteBaseName, moduleInterfacePath,
612-
moduleBuffer, moduleDocBuffer, moduleSourceInfoBuffer);
614+
moduleBuffer, moduleDocBuffer, moduleSourceInfoBuffer, isFramework);
613615
if (!result)
614616
return true;
615617
else if (result == std::errc::not_supported)
@@ -628,7 +630,7 @@ SerializedModuleLoaderBase::findModule(AccessPathElem moduleID,
628630
// Frameworks always use architecture-specific files within a
629631
// .swiftmodule directory.
630632
llvm::sys::path::append(currPath, "Modules");
631-
return findTargetSpecificModuleFiles();
633+
return findTargetSpecificModuleFiles(isFramework);
632634
}
633635
}
634636
llvm_unreachable("covered switch");
@@ -1081,7 +1083,8 @@ std::error_code MemoryBufferSerializedModuleLoader::findModuleFilesInDirectory(
10811083
SmallVectorImpl<char> *ModuleInterfacePath,
10821084
std::unique_ptr<llvm::MemoryBuffer> *ModuleBuffer,
10831085
std::unique_ptr<llvm::MemoryBuffer> *ModuleDocBuffer,
1084-
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer) {
1086+
std::unique_ptr<llvm::MemoryBuffer> *ModuleSourceInfoBuffer,
1087+
bool IsFramework) {
10851088
// This is a soft error instead of an llvm_unreachable because this API is
10861089
// primarily used by LLDB which makes it more likely that unwitting changes to
10871090
// the Swift compiler accidentally break the contract.

test/ScanDependencies/Inputs/ModuleDependencyGraph.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ struct SwiftModuleDetails: Codable {
9090
/// arguments to the generic PCM build arguments reported from the dependency
9191
/// graph.
9292
var extraPcmArgs: [String]?
93+
94+
/// A flag to indicate whether or not this module is a framework.
95+
var isFramework: Bool
9396
}
9497

9598
/// Details specific to Swift external modules.

test/ScanDependencies/can_import_with_map.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,18 @@
88
// RUN: echo "\"moduleName\": \"Foo\"," >> %/t/inputs/map.json
99
// RUN: echo "\"modulePath\": \"%/t/inputs/Foo.swiftmodule\"," >> %/t/inputs/map.json
1010
// RUN: echo "\"docPath\": \"%/t/inputs/Foo.swiftdoc\"," >> %/t/inputs/map.json
11-
// RUN: echo "\"sourceInfoPath\": \"%/t/inputs/Foo.swiftsourceinfo\"" >> %/t/inputs/map.json
11+
// RUN: echo "\"sourceInfoPath\": \"%/t/inputs/Foo.swiftsourceinfo\"," >> %/t/inputs/map.json
12+
// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json
1213
// RUN: echo "}," >> %/t/inputs/map.json
1314
// RUN: echo "{" >> %/t/inputs/map.json
1415
// RUN: echo "\"moduleName\": \"Swift\"," >> %/t/inputs/map.json
15-
// RUN: echo "\"modulePath\": \"%/stdlib_module\"" >> %/t/inputs/map.json
16+
// RUN: echo "\"modulePath\": \"%/stdlib_module\"," >> %/t/inputs/map.json
17+
// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json
1618
// RUN: echo "}," >> %/t/inputs/map.json
1719
// RUN: echo "{" >> %/t/inputs/map.json
1820
// RUN: echo "\"moduleName\": \"SwiftOnoneSupport\"," >> %/t/inputs/map.json
19-
// RUN: echo "\"modulePath\": \"%/ononesupport_module\"" >> %/t/inputs/map.json
21+
// RUN: echo "\"modulePath\": \"%/ononesupport_module\"," >> %/t/inputs/map.json
22+
// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json
2023
// RUN: echo "}]" >> %/t/inputs/map.json
2124

2225
// RUN: %target-swift-frontend -typecheck %s -explicit-swift-module-map-file %t/inputs/map.json -disable-implicit-swift-modules

test/ScanDependencies/explicit-module-map-forwarding-module.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,18 @@
1818
// RUN: echo "\"moduleName\": \"Foo\"," >> %/t/inputs/map.json
1919
// RUN: echo "\"modulePath\": \"%/t/inputs/Foo-from-interface.swiftmodule\"," >> %/t/inputs/map.json
2020
// RUN: echo "\"docPath\": \"%/t/inputs/Foo.swiftdoc\"," >> %/t/inputs/map.json
21-
// RUN: echo "\"sourceInfoPath\": \"%/t/inputs/Foo.swiftsourceinfo\"" >> %/t/inputs/map.json
21+
// RUN: echo "\"sourceInfoPath\": \"%/t/inputs/Foo.swiftsourceinfo\"," >> %/t/inputs/map.json
22+
// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json
2223
// RUN: echo "}," >> %/t/inputs/map.json
2324
// RUN: echo "{" >> %/t/inputs/map.json
2425
// RUN: echo "\"moduleName\": \"Swift\"," >> %/t/inputs/map.json
25-
// RUN: echo "\"modulePath\": \"%/stdlib_module\"" >> %/t/inputs/map.json
26+
// RUN: echo "\"modulePath\": \"%/stdlib_module\"," >> %/t/inputs/map.json
27+
// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json
2628
// RUN: echo "}," >> %/t/inputs/map.json
2729
// RUN: echo "{" >> %/t/inputs/map.json
2830
// RUN: echo "\"moduleName\": \"SwiftOnoneSupport\"," >> %/t/inputs/map.json
29-
// RUN: echo "\"modulePath\": \"%/ononesupport_module\"" >> %/t/inputs/map.json
31+
// RUN: echo "\"modulePath\": \"%/ononesupport_module\"," >> %/t/inputs/map.json
32+
// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json
3033
// RUN: echo "}]" >> %/t/inputs/map.json
3134

3235
// RUN: %target-swift-ide-test -print-module-comments -module-to-print=Foo -enable-swiftsourceinfo -source-filename %s -explicit-swift-module-map-file %t/inputs/map.json | %FileCheck %s

test/ScanDependencies/explicit-module-map.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,18 @@
99
// RUN: echo "\"moduleName\": \"Foo\"," >> %/t/inputs/map.json
1010
// RUN: echo "\"modulePath\": \"%/t/inputs/Foo.swiftmodule\"," >> %/t/inputs/map.json
1111
// RUN: echo "\"docPath\": \"%/t/inputs/Foo.swiftdoc\"," >> %/t/inputs/map.json
12-
// RUN: echo "\"sourceInfoPath\": \"%/t/inputs/Foo.swiftsourceinfo\"" >> %/t/inputs/map.json
12+
// RUN: echo "\"sourceInfoPath\": \"%/t/inputs/Foo.swiftsourceinfo\"," >> %/t/inputs/map.json
13+
// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json
1314
// RUN: echo "}," >> %/t/inputs/map.json
1415
// RUN: echo "{" >> %/t/inputs/map.json
1516
// RUN: echo "\"moduleName\": \"Swift\"," >> %/t/inputs/map.json
16-
// RUN: echo "\"modulePath\": \"%/stdlib_module\"" >> %/t/inputs/map.json
17+
// RUN: echo "\"modulePath\": \"%/stdlib_module\"," >> %/t/inputs/map.json
18+
// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json
1719
// RUN: echo "}," >> %/t/inputs/map.json
1820
// RUN: echo "{" >> %/t/inputs/map.json
1921
// RUN: echo "\"moduleName\": \"SwiftOnoneSupport\"," >> %/t/inputs/map.json
20-
// RUN: echo "\"modulePath\": \"%/ononesupport_module\"" >> %/t/inputs/map.json
22+
// RUN: echo "\"modulePath\": \"%/ononesupport_module\"," >> %/t/inputs/map.json
23+
// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json
2124
// RUN: echo "}]" >> %/t/inputs/map.json
2225

2326
// RUN: %target-swift-ide-test -print-module-comments -module-to-print=Foo -enable-swiftsourceinfo -source-filename %s -explicit-swift-module-map-file %t/inputs/map.json | %FileCheck %s

0 commit comments

Comments
 (0)