Skip to content

Commit 88dc77e

Browse files
committed
Move ASTGen to the Swift compiler; keep only CMake changes.
1 parent 4e6ae0d commit 88dc77e

File tree

5 files changed

+4
-282
lines changed

5 files changed

+4
-282
lines changed

Sources/ASTGen/ASTGen.swift

Lines changed: 0 additions & 253 deletions
This file was deleted.

Sources/ASTGen/CMakeLists.txt

Lines changed: 0 additions & 28 deletions
This file was deleted.

Sources/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@
99
add_subdirectory(SwiftSyntax)
1010
add_subdirectory(SwiftDiagnostics)
1111
add_subdirectory(SwiftParser)
12-
add_subdirectory(ASTGen)

Sources/SwiftParser/CharacterInfo.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ extension Unicode.Scalar {
9393
}
9494
}
9595

96+
#if swift(<5.7)
9697
extension UnsafeRawBufferPointer {
9798
/// Returns a typed buffer to the memory referenced by this buffer,
9899
/// assuming that the memory is already bound to the specified type.
@@ -121,6 +122,7 @@ extension UnsafeRawBufferPointer {
121122
return .init(start: s.assumingMemoryBound(to: T.self), count: n)
122123
}
123124
}
125+
#endif
124126

125127
private var InfoTable: CharacterInfoTable = (
126128
// 0 NUL 1 SOH 2 STX 3 ETX

Sources/SwiftSyntax/BumpPtrAllocator.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ public class BumpPtrAllocator {
163163

164164
// MARK: Compatibilty Shims
165165

166+
#if swift(<5.7)
166167
extension UnsafeMutableRawPointer {
167168
/// Obtain the next pointer whose bit pattern is a multiple of alignment.
168169
///
@@ -180,3 +181,4 @@ extension UnsafeMutableRawPointer {
180181
return .init(bitPattern: bits)!
181182
}
182183
}
184+
#endif

0 commit comments

Comments
 (0)