Skip to content

Commit 8c6307c

Browse files
committed
[Serialization] Do not 'stat' SDK-relative dependencies when collecting serialization deps
1 parent 8e72a01 commit 8c6307c

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

lib/Frontend/ModuleInterfaceBuilder.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,15 @@ bool ExplicitModuleInterfaceBuilder::collectDepsForSerialization(
148148
if (DepName.starts_with(ResourcePath))
149149
continue;
150150

151-
auto Status = fs.status(DepName);
152-
if (!Status) {
153-
Instance.getDiags().diagnose(SourceLoc(), diag::cannot_open_file, DepName,
154-
Status.getError().message());
155-
return true;
151+
// Only validate non-sdk-relative inputs. Querying sdk-relative inputs
152+
// should not be necessary.
153+
if (!IsSDKRelative) {
154+
auto Status = fs.status(DepName);
155+
if (!Status) {
156+
Instance.getDiags().diagnose(SourceLoc(), diag::cannot_open_file, DepName,
157+
Status.getError().message());
158+
return true;
159+
}
156160
}
157161

158162
/// Lazily load the dependency buffer if we need it. If we're not

0 commit comments

Comments
 (0)