Skip to content

[ParseableInterface] Accept no space after "swift-module-flags:" #21334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Frontend/ParseableInterfaceSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
6 changes: 5 additions & 1 deletion test/ParseableInterface/SmokeTest.swiftinterface
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// 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
// swift-module-flags:

// Make sure parse-only works...
// RUN: %target-swift-frontend -parse %s
Expand Down