mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ParseableInterface] Accept no space after "swift-module-flags:" (#21334)
I lost about a minute or so to this with a manually-written swiftinterface, so may as well avoid that problem in the future.
This commit is contained in:
@@ -562,7 +562,7 @@ llvm::Regex swift::getSwiftInterfaceFormatVersionRegex() {
|
||||
}
|
||||
|
||||
llvm::Regex swift::getSwiftInterfaceModuleFlagsRegex() {
|
||||
return llvm::Regex("^// " SWIFT_MODULE_FLAGS_KEY ": (.*)$",
|
||||
return llvm::Regex("^// " SWIFT_MODULE_FLAGS_KEY ":(.*)$",
|
||||
llvm::Regex::Newline);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// The "flags" line in this test deliberately has no flags and no space after
|
||||
// the colon, just to make sure that works (even though it'll never be printed
|
||||
// that way).
|
||||
|
||||
// swift-module-flags:
|
||||
// swift-interface-format-version: 1.0
|
||||
|
||||
// Make sure parse-only works...
|
||||
// RUN: %target-swift-frontend -parse %s
|
||||
|
||||
Reference in New Issue
Block a user