Skip to content

Commit 04ce3fe

Browse files
committed
Fix up compiler and standard library build when there's no host Swift
1 parent 70b1c3b commit 04ce3fe

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/AST/ASTScope.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ void ASTScope::unqualifiedLookup(
148148
if (auto *s = SF->getASTContext().Stats)
149149
++s->getFrontendCounters().NumASTScopeLookups;
150150

151+
#if SWIFT_BUILD_SWIFT_SYNTAX
151152
// Perform validation of SwiftLexicalLookup if option
152153
// Feature::UnqualifiedLookupValidation is enabled and lookup was not
153154
// performed in a macro.
@@ -171,6 +172,9 @@ void ASTScope::unqualifiedLookup(
171172
} else {
172173
ASTScopeImpl::unqualifiedLookup(SF, loc, consumer);
173174
}
175+
#else
176+
ASTScopeImpl::unqualifiedLookup(SF, loc, consumer);
177+
#endif
174178
}
175179

176180
llvm::SmallVector<LabeledStmt *, 4> ASTScope::lookupLabeledStmts(

stdlib/public/core/SwiftifyImport.swift

+2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ public enum _SwiftifyInfo {
5858
///
5959
/// Parameter paramInfo: information about how the function uses the pointer passed to it. The
6060
/// safety of the generated wrapper function depends on this info being extensive and accurate.
61+
#if hasFeature(Macros)
6162
@attached(peer, names: overloaded)
6263
public macro _SwiftifyImport(_ paramInfo: _SwiftifyInfo..., typeMappings: [String: String] = [:]) =
6364
#externalMacro(module: "SwiftMacros", type: "SwiftifyImportMacro")
65+
#endif

0 commit comments

Comments
 (0)