Skip to content

Commit 1350f41

Browse files
committed
Address code review comments and build failure
1 parent 9074228 commit 1350f41

File tree

5 files changed

+8
-3
lines changed

5 files changed

+8
-3
lines changed

include/swift/AST/IfConfigClauseRangeInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- ASTBridging.h - header for the swift SILBridging module ----------===//
1+
//===--- IfConfigClauseRangeInfo.h - header for #if clauses -=====---------===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

lib/AST/ASTBridging.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ bool BridgedASTContext_canImport(BridgedASTContext cContext,
238238

239239
// FIXME: The source location here is empty because build configurations
240240
// are supposed to be completely separated from source code. We could re-plumb
241-
// things to have any errors reported up thruough the "canImportModule"
241+
// things to have any errors reported up through the "canImportModule"
242242
// API.
243243
ImportPath::Module::Builder builder(
244244
cContext.unbridged(), importPath.unbridged(), /*separator=*/'.',

lib/AST/Module.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2962,8 +2962,12 @@ IfConfigClauseRangeInfo::getWholeRange(const SourceManager &SM) const {
29622962

29632963
void SourceFile::recordIfConfigClauseRangeInfo(
29642964
const IfConfigClauseRangeInfo &range) {
2965+
#if SWIFT_BUILD_SWIFT_SYNTAX
2966+
// Don't record ranges; they'll be extracted from swift-syntax when needed.
2967+
#else
29652968
IfConfigClauseRanges.Ranges.push_back(range);
29662969
IfConfigClauseRanges.IsSorted = false;
2970+
#endif
29672971
}
29682972

29692973
ArrayRef<IfConfigClauseRangeInfo> SourceFile::getIfConfigClauseRanges() const {

lib/ASTGen/Sources/ASTGen/CompilerBuildConfiguration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- CompilerBuildConfiguration.swift --------------\------------------===//
1+
//===--- CompilerBuildConfiguration.swift ---------------------------------===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

lib/CompilerSwiftSyntax/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ includeSwiftSyntax()
3030

3131
set(compiler_swiftsyntax_libs
3232
_CompilerSwiftSyntax
33+
_CompilerSwiftIfConfig
3334
_CompilerSwiftOperators
3435
_CompilerSwiftSyntaxBuilder
3536
_CompilerSwiftParser

0 commit comments

Comments
 (0)