Skip to content

Commit 2fd4ea7

Browse files
committed
[SwiftIfConfig] Add StaticBuildConfiguration
Introduce StaticBuildConfiguration, a data structure that describes all of the aspects of a build configuration that are needed for `#if` evaluation. It is Codable so that it can be stored and replayed later.
1 parent 6673b05 commit 2fd4ea7

File tree

7 files changed

+444
-13
lines changed

7 files changed

+444
-13
lines changed

Sources/SwiftIfConfig/BuildConfiguration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import SwiftSyntax
1414

1515
/// Describes the ordering of a sequence of bytes that make up a word of
1616
/// storage for a particular architecture.
17-
public enum Endianness: String {
17+
public enum Endianness: String, Codable {
1818
/// Little endian, meaning that the least significant byte of a word is
1919
/// stored at the lowest address.
2020
case little

Sources/SwiftIfConfig/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ add_swift_syntax_library(SwiftIfConfig
1717
IfConfigDiagnostic.swift
1818
IfConfigEvaluation.swift
1919
IfConfigFunctions.swift
20+
StaticBuildConfiguration.swift
2021
SyntaxLiteralUtils.swift
2122
SyntaxProtocol+IfConfig.swift
2223
VersionTuple+Parsing.swift

0 commit comments

Comments
 (0)