Skip to content

Commit 5a3ff4a

Browse files
committed
Address code review comments and build failure
1 parent 37ebac2 commit 5a3ff4a

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
@@ -2950,8 +2950,12 @@ IfConfigClauseRangeInfo::getWholeRange(const SourceManager &SM) const {
29502950

29512951
void SourceFile::recordIfConfigClauseRangeInfo(
29522952
const IfConfigClauseRangeInfo &range) {
2953+
#if SWIFT_BUILD_SWIFT_SYNTAX
2954+
// Don't record ranges; they'll be extracted from swift-syntax when needed.
2955+
#else
29532956
IfConfigClauseRanges.Ranges.push_back(range);
29542957
IfConfigClauseRanges.IsSorted = false;
2958+
#endif
29552959
}
29562960

29572961
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)