Skip to content

Commit 754ec0b

Browse files
authored
Merge pull request #2175 from mininny/enable-memory-layout-test-in-release
Enable Memory Layout Tests in Release build
2 parents 45ba983 + 27706af commit 754ec0b

File tree

4 files changed

+0
-9
lines changed

4 files changed

+0
-9
lines changed

Sources/SwiftSyntax/MemoryLayout.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#if DEBUG
1413
// See `MemoryLayoutTest.swift`.
1514
@_spi(Testing) public enum SyntaxMemoryLayout {
1615
public struct Value: Equatable {
@@ -41,4 +40,3 @@
4140
return result
4241
}
4342
}
44-
#endif

Sources/SwiftSyntax/Raw/RawSyntax.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,6 @@ extension RawSyntax: Identifiable {
944944
}
945945
}
946946

947-
#if DEBUG
948947
/// See `SyntaxMemoryLayout`.
949948
var RawSyntaxDataMemoryLayouts: [String: SyntaxMemoryLayout.Value] = [
950949
"RawSyntaxData": .init(RawSyntaxData.self),
@@ -953,4 +952,3 @@ var RawSyntaxDataMemoryLayouts: [String: SyntaxMemoryLayout.Value] = [
953952
"RawSyntaxData.MaterializedToken": .init(RawSyntaxData.MaterializedToken.self),
954953
"RawSyntax?": .init(RawSyntax?.self),
955954
]
956-
#endif

Sources/SwiftSyntax/Syntax.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,10 @@ extension Syntax {
308308
@available(*, unavailable, message: "use 'Syntax' instead")
309309
public struct SyntaxNode {}
310310

311-
#if DEBUG
312311
/// See `SyntaxMemoryLayout`.
313312
var SyntaxMemoryLayouts: [String: SyntaxMemoryLayout.Value] = [
314313
"Syntax": .init(Syntax.self),
315314
"Syntax.Info": .init(Syntax.Info.self),
316315
"Syntax.Info.Root": .init(Syntax.Info.Root.self),
317316
"Syntax.Info.NonRoot": .init(Syntax.Info.NonRoot.self),
318317
]
319-
#endif

Tests/SwiftSyntaxTest/MemoryLayoutTest.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
@_spi(Testing) import SwiftSyntax
1414
import XCTest
1515

16-
#if DEBUG
1716
final class MemoryLayoutTest: XCTestCase {
1817

1918
func testMemoryLayouts() throws {
@@ -46,6 +45,4 @@ final class MemoryLayoutTest: XCTestCase {
4645
XCTAssertEqual(actualValue, exp.value, "Matching '\(exp.key)' values")
4746
}
4847
}
49-
5048
}
51-
#endif

0 commit comments

Comments
 (0)