Skip to content

Commit 8a6b7f0

Browse files
committed
[ImportResolution] Remove early exit that will never trigger
There's only one caller to performImportResolutionForClangMacroBuffer, which always passes a newly allocated SourceFile. This removes a redundant check for whether its imports have been resolved, and instead asserts that they haven't.
1 parent 33634be commit 8a6b7f0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/Sema/ImportResolution.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,7 @@ void swift::performImportResolution(SourceFile &SF) {
327327
}
328328

329329
void swift::performImportResolutionForClangMacroBuffer(SourceFile &SF) {
330-
// If we've already performed import resolution, bail.
331-
if (SF.ASTStage == SourceFile::ImportsResolved)
332-
return;
330+
assert(SF.ASTStage == SourceFile::Unprocessed);
333331

334332
// `getWrapperForModule` has already declared all the implicit clang module
335333
// imports we need

0 commit comments

Comments
 (0)