Skip to content

Commit 27a1c12

Browse files
authored
Merge pull request #1047 from apple/revert-1045-EnableRegexLiteralFlag
Revert "Add support for `-enable-regex-literals` flag"
2 parents 5167d07 + fb32df4 commit 27a1c12

File tree

3 files changed

+0
-18
lines changed

3 files changed

+0
-18
lines changed

Sources/SwiftDriver/Jobs/FrontendJobHelpers.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,6 @@ extension Driver {
206206
try commandLine.appendAll(.coveragePrefixMap, from: &parsedOptions)
207207
try commandLine.appendLast(.warnConcurrency, from: &parsedOptions)
208208
try commandLine.appendAll(.moduleAlias, from: &parsedOptions)
209-
if isFrontendArgSupported(.enableRegexLiterals) {
210-
try commandLine.appendLast(.enableRegexLiterals, from: &parsedOptions)
211-
}
212209

213210
// Expand the -experimental-hermetic-seal-at-link flag
214211
if parsedOptions.hasArgument(.experimentalHermeticSealAtLink) {

Sources/SwiftOptions/Options.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,6 @@ extension Option {
327327
public static let enableOssaModules: Option = Option("-enable-ossa-modules", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Always serialize SIL in ossa form. If this flag is not passed in, when optimizing ownership will be lowered before serializing SIL")
328328
public static let enableParameterizedProtocolTypes: Option = Option("-enable-parameterized-protocol-types", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Enable experimental support for primary associated types and parameterized protocols")
329329
public static let enablePrivateImports: Option = Option("-enable-private-imports", .flag, attributes: [.helpHidden, .frontend, .noInteractive], helpText: "Allows this module's internal and private API to be accessed")
330-
public static let enableRegexLiterals: Option = Option("-enable-regex-literals", .flag, attributes: [.frontend], helpText: "Enable the use of regular-expression literals")
331330
public static let enableRequirementMachineOpaqueArchetypes: Option = Option("-enable-requirement-machine-opaque-archetypes", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Enable more correct opaque archetype support, which is off by default because it might fail to produce a convergent rewrite system")
332331
public static let enableResilience: Option = Option("-enable-resilience", .flag, attributes: [.helpHidden, .frontend, .noDriver, .moduleInterface], helpText: "Deprecated, use -enable-library-evolution instead")
333332
public static let enableSilOpaqueValues: Option = Option("-enable-sil-opaque-values", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Enable SIL Opaque Values")
@@ -993,7 +992,6 @@ extension Option {
993992
Option.enableOssaModules,
994993
Option.enableParameterizedProtocolTypes,
995994
Option.enablePrivateImports,
996-
Option.enableRegexLiterals,
997995
Option.enableRequirementMachineOpaqueArchetypes,
998996
Option.enableResilience,
999997
Option.enableSilOpaqueValues,

Tests/SwiftDriverTests/SwiftDriverTests.swift

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3048,19 +3048,6 @@ final class SwiftDriverTests: XCTestCase {
30483048
XCTAssertTrue(plannedJobs[0].commandLine.contains(.path(try VirtualPath(path: modulePath))))
30493049
}
30503050

3051-
func testEnableRegexLiteralFlag() throws {
3052-
var driver = try Driver(args: ["swiftc", "foo.swift", "-enable-regex-literals"])
3053-
guard driver.isFrontendArgSupported(.enableRegexLiterals) else {
3054-
throw XCTSkip("Skipping: compiler does not support '-enable-regex-literals'")
3055-
}
3056-
let plannedJobs = try driver.planBuild()
3057-
XCTAssertEqual(plannedJobs.count, 2)
3058-
XCTAssertEqual(plannedJobs[0].kind, .compile)
3059-
XCTAssertEqual(plannedJobs[1].kind, .link)
3060-
XCTAssertTrue(plannedJobs[0].commandLine.contains(.flag("-frontend")))
3061-
XCTAssertTrue(plannedJobs[0].commandLine.contains(.flag("-enable-regex-literals")))
3062-
}
3063-
30643051
func testImmediateMode() throws {
30653052
do {
30663053
var driver = try Driver(args: ["swift", "foo.swift"])

0 commit comments

Comments
 (0)