Skip to content

Commit a135aa5

Browse files
committed
[Serialization] Minor improvements to doc from PR comments
1 parent e0a8166 commit a135aa5

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

include/swift/AST/Module.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ class ModuleDecl
545545
}
546546

547547
/// Returns true if the module was rebuilt from a module interface instead
548-
/// of being build from the full source.
548+
/// of being built from the full source.
549549
bool isBuiltFromInterface() const {
550550
return Bits.ModuleDecl.IsBuiltFromInterface;
551551
}

include/swift/ClangImporter/ClangImporter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ class ClangImporter final : public ClangModuleLoader {
220220
/// \param path A sequence of (identifier, location) pairs that denote
221221
/// the dotted module name to load, e.g., AppKit.NSWindow.
222222
///
223-
/// \param AllowMemoryCache Enables preserving the loaded module in the
224-
/// in-memory cache for the next loading attempt.
223+
/// \param AllowMemoryCache Affects only loading serialized Swift modules,
224+
/// this parameter has no effect in the ClangImporter.
225225
///
226226
/// \returns the module referenced, if it could be loaded. Otherwise,
227227
/// emits a diagnostic and returns NULL.

lib/FrontendTool/FrontendTool.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,10 @@ static bool buildModuleFromInterface(CompilerInstance &Instance) {
430430
Invocation.getFrontendOptions().RequestedAction !=
431431
FrontendOptions::ActionType::TypecheckModuleFromInterface &&
432432
!Invocation.getFrontendOptions().ExplicitInterfaceBuild) {
433-
IgnoreAdjacentModules = Instance.getASTContext().IgnoreAdjacentModules;
434-
}
433+
// Only pass down IgnoreAdjacentModules when the parent instance has an
434+
// ASTContext.
435+
IgnoreAdjacentModules = Instance.getASTContext().IgnoreAdjacentModules;
436+
}
435437

436438
// If an explicit interface build was requested, bypass the creation of a new
437439
// sub-instance from the interface which will build it in a separate thread,

0 commit comments

Comments
 (0)