Skip to content

Commit 3cb74e9

Browse files
committed
Address review feedback
1 parent 5853304 commit 3cb74e9

File tree

6 files changed

+18
-8
lines changed

6 files changed

+18
-8
lines changed

SwiftCompilerSources/Package.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ private extension Target {
5858
let package = Package(
5959
name: "SwiftCompilerSources",
6060
platforms: [
61+
// We need at least macOS 13 here to avoid hitting an availability error
62+
// for CxxStdlib. It's only needed for the package though, the CMake build
63+
// works fine with a lower deployment target.
6164
.macOS(.v13),
6265
],
6366
products: [

include/swift/AST/ASTBridging.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,8 +927,9 @@ SWIFT_END_ASSUME_NONNULL
927927
SWIFT_END_NULLABILITY_ANNOTATIONS
928928

929929
#ifndef PURE_BRIDGING_MODE
930-
// In _not_ PURE_BRIDGING_MODE, briding functions are inlined and therefore
931-
// included in the header file.
930+
// In _not_ PURE_BRIDGING_MODE, bridging functions are inlined and therefore
931+
// included in the header file. This is because they rely on C++ headers that
932+
// we don't want to pull in when using "pure bridging mode".
932933
#include "ASTBridgingImpl.h"
933934
#endif
934935

include/swift/Basic/BasicBridging.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include <string>
3737
#endif
3838

39-
// FIXME: We ought to be importing '<swift/briging>' instead.
39+
// FIXME: We ought to be importing '<swift/bridging>' instead.
4040
#if __has_attribute(swift_name)
4141
#define SWIFT_NAME(NAME) __attribute__((swift_name(NAME)))
4242
#else
@@ -273,7 +273,7 @@ class BridgedSourceLoc {
273273
};
274274

275275
SWIFT_NAME("getter:BridgedSourceLoc.isValid(self:)")
276-
BRIDGED_INLINE bool BridgedSourceLoc_isValid(BridgedSourceLoc str);
276+
BRIDGED_INLINE bool BridgedSourceLoc_isValid(BridgedSourceLoc loc);
277277

278278
//===----------------------------------------------------------------------===//
279279
// MARK: SourceRange
@@ -359,7 +359,8 @@ SWIFT_END_NULLABILITY_ANNOTATIONS
359359

360360
#ifndef PURE_BRIDGING_MODE
361361
// In _not_ PURE_BRIDGING_MODE, bridging functions are inlined and therefore
362-
// included in the header file.
362+
// included in the header file. This is because they rely on C++ headers that
363+
// we don't want to pull in when using "pure bridging mode".
363364
#include "BasicBridgingImpl.h"
364365
#endif
365366

include/swift/Basic/BasicBridgingImpl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ bool BridgedOwnedString_empty(BridgedOwnedString str) {
7474
// MARK: BridgedSourceLoc
7575
//===----------------------------------------------------------------------===//
7676

77-
bool BridgedSourceLoc_isValid(BridgedSourceLoc str) {
78-
return str.getOpaquePointerValue() != nullptr;
77+
bool BridgedSourceLoc_isValid(BridgedSourceLoc loc) {
78+
return loc.getOpaquePointerValue() != nullptr;
7979
}
8080

8181
BridgedSourceLoc BridgedSourceLoc::advancedBy(size_t n) const {

include/swift/SIL/SILBridging.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,9 @@ void writeCharToStderr(int c);
992992
SWIFT_END_NULLABILITY_ANNOTATIONS
993993

994994
#ifndef PURE_BRIDGING_MODE
995-
// In _not_ PURE_BRIDGING_MODE, briding functions are inlined and therefore inluded in the header file.
995+
// In _not_ PURE_BRIDGING_MODE, bridging functions are inlined and therefore
996+
// included in the header file. This is because they rely on C++ headers that
997+
// we don't want to pull in when using "pure bridging mode".
996998
#include "SILBridgingImpl.h"
997999
#endif
9981000

lib/ASTGen/Package.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ let swiftSetttings: [SwiftSetting] = [
3737
let package = Package(
3838
name: "swiftSwiftCompiler",
3939
platforms: [
40+
// We need at least macOS 13 here to avoid hitting an availability error
41+
// for CxxStdlib. It's only needed for the package though, the CMake build
42+
// works fine with a lower deployment target.
4043
.macOS(.v13)
4144
],
4245
products: [

0 commit comments

Comments
 (0)