@@ -1047,9 +1047,8 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
1047
1047
return false ;
1048
1048
}
1049
1049
1050
- static std::string getScriptFileName (StringRef name, bool isSwiftVersion3) {
1051
- StringRef langVer = isSwiftVersion3 ? " 3" : " 4" ;
1052
- return (Twine (name) + langVer + " .json" ).str ();
1050
+ static std::string getScriptFileName (StringRef name) {
1051
+ return (Twine (name) + " 4" + " .json" ).str ();
1053
1052
}
1054
1053
1055
1054
static bool ParseMigratorArgs (MigratorOptions &Opts,
@@ -1082,7 +1081,6 @@ static bool ParseMigratorArgs(MigratorOptions &Opts,
1082
1081
Opts.APIDigesterDataStorePaths .push_back (DataPath->getValue ());
1083
1082
} else {
1084
1083
auto &Triple = LangOpts.Target ;
1085
- bool isSwiftVersion3 = LangOpts.isSwiftVersion3 ();
1086
1084
1087
1085
llvm::SmallString<128 > basePath;
1088
1086
if (auto DataDir = Args.getLastArg (OPT_api_diff_data_dir)) {
@@ -1096,23 +1094,18 @@ static bool ParseMigratorArgs(MigratorOptions &Opts,
1096
1094
llvm::SmallString<128 > dataPath (basePath);
1097
1095
1098
1096
if (Triple.isMacOSX ())
1099
- llvm::sys::path::append (dataPath,
1100
- getScriptFileName (" macos" , isSwiftVersion3));
1097
+ llvm::sys::path::append (dataPath, getScriptFileName (" macos" ));
1101
1098
else if (Triple.isiOS ())
1102
- llvm::sys::path::append (dataPath,
1103
- getScriptFileName (" ios" , isSwiftVersion3));
1099
+ llvm::sys::path::append (dataPath, getScriptFileName (" ios" ));
1104
1100
else if (Triple.isTvOS ())
1105
- llvm::sys::path::append (dataPath,
1106
- getScriptFileName (" tvos" , isSwiftVersion3));
1101
+ llvm::sys::path::append (dataPath, getScriptFileName (" tvos" ));
1107
1102
else if (Triple.isWatchOS ())
1108
- llvm::sys::path::append (dataPath,
1109
- getScriptFileName (" watchos" , isSwiftVersion3));
1103
+ llvm::sys::path::append (dataPath, getScriptFileName (" watchos" ));
1110
1104
else
1111
1105
Supported = false ;
1112
1106
if (Supported) {
1113
1107
llvm::SmallString<128 > authoredDataPath (basePath);
1114
- llvm::sys::path::append (authoredDataPath,
1115
- getScriptFileName (" overlay" , isSwiftVersion3));
1108
+ llvm::sys::path::append (authoredDataPath, getScriptFileName (" overlay" ));
1116
1109
// Add authored list first to take higher priority.
1117
1110
Opts.APIDigesterDataStorePaths .push_back (authoredDataPath.str ());
1118
1111
Opts.APIDigesterDataStorePaths .push_back (dataPath.str ());
0 commit comments