@@ -1191,24 +1191,21 @@ bool InterfaceSubContextDelegateImpl::extractSwiftInterfaceVersionAndArgs(
1191
1191
auto SB = FileOrError.get ()->getBuffer ();
1192
1192
auto VersRe = getSwiftInterfaceFormatVersionRegex ();
1193
1193
auto CompRe = getSwiftInterfaceCompilerVersionRegex ();
1194
- auto FlagRe = getSwiftInterfaceModuleFlagsRegex ();
1195
- SmallVector<StringRef, 1 > VersMatches, FlagMatches, CompMatches;
1194
+ SmallVector<StringRef, 1 > VersMatches, CompMatches;
1196
1195
1197
1196
if (!VersRe.match (SB, &VersMatches)) {
1198
1197
diagnose (interfacePath, diagnosticLoc,
1199
1198
diag::error_extracting_version_from_module_interface);
1200
1199
return true ;
1201
1200
}
1202
- if (!FlagRe. match (SB, &FlagMatches )) {
1201
+ if (extractCompilerFlagsFromInterface (SB, ArgSaver, SubArgs )) {
1203
1202
diagnose (interfacePath, diagnosticLoc,
1204
1203
diag::error_extracting_version_from_module_interface);
1205
1204
return true ;
1206
1205
}
1207
1206
assert (VersMatches.size () == 2 );
1208
- assert (FlagMatches.size () == 2 );
1209
1207
// FIXME We should diagnose this at a location that makes sense:
1210
1208
auto Vers = swift::version::Version (VersMatches[1 ], SourceLoc (), &Diags);
1211
- llvm::cl::TokenizeGNUCommandLine (FlagMatches[1 ], ArgSaver, SubArgs);
1212
1209
1213
1210
if (CompRe.match (SB, &CompMatches)) {
1214
1211
assert (CompMatches.size () == 2 );
0 commit comments