Skip to content

migrator: remove migration scripts for migrating from Swift 3. #19821

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
Oct 10, 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
21 changes: 7 additions & 14 deletions lib/Frontend/CompilerInvocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1047,9 +1047,8 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
return false;
}

static std::string getScriptFileName(StringRef name, bool isSwiftVersion3) {
StringRef langVer = isSwiftVersion3 ? "3" : "4";
return (Twine(name) + langVer + ".json").str();
static std::string getScriptFileName(StringRef name) {
return (Twine(name) + "4" + ".json").str();
}

static bool ParseMigratorArgs(MigratorOptions &Opts,
Expand Down Expand Up @@ -1082,7 +1081,6 @@ static bool ParseMigratorArgs(MigratorOptions &Opts,
Opts.APIDigesterDataStorePaths.push_back(DataPath->getValue());
} else {
auto &Triple = LangOpts.Target;
bool isSwiftVersion3 = LangOpts.isSwiftVersion3();

llvm::SmallString<128> basePath;
if (auto DataDir = Args.getLastArg(OPT_api_diff_data_dir)) {
Expand All @@ -1096,23 +1094,18 @@ static bool ParseMigratorArgs(MigratorOptions &Opts,
llvm::SmallString<128> dataPath(basePath);

if (Triple.isMacOSX())
llvm::sys::path::append(dataPath,
getScriptFileName("macos", isSwiftVersion3));
llvm::sys::path::append(dataPath, getScriptFileName("macos"));
else if (Triple.isiOS())
llvm::sys::path::append(dataPath,
getScriptFileName("ios", isSwiftVersion3));
llvm::sys::path::append(dataPath, getScriptFileName("ios"));
else if (Triple.isTvOS())
llvm::sys::path::append(dataPath,
getScriptFileName("tvos", isSwiftVersion3));
llvm::sys::path::append(dataPath, getScriptFileName("tvos"));
else if (Triple.isWatchOS())
llvm::sys::path::append(dataPath,
getScriptFileName("watchos", isSwiftVersion3));
llvm::sys::path::append(dataPath, getScriptFileName("watchos"));
else
Supported = false;
if (Supported) {
llvm::SmallString<128> authoredDataPath(basePath);
llvm::sys::path::append(authoredDataPath,
getScriptFileName("overlay", isSwiftVersion3));
llvm::sys::path::append(authoredDataPath, getScriptFileName("overlay"));
// Add authored list first to take higher priority.
Opts.APIDigesterDataStorePaths.push_back(authoredDataPath.str());
Opts.APIDigesterDataStorePaths.push_back(dataPath.str());
Expand Down
5 changes: 0 additions & 5 deletions lib/Migrator/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
set(datafiles
macos3.json
macos4.json
ios3.json
ios4.json
tvos3.json
tvos4.json
watchos3.json
watchos4.json
overlay3.json
overlay4.json
)
set(SWIFTLIB_DIR
Expand Down
1 change: 0 additions & 1 deletion lib/Migrator/ios3.json

This file was deleted.

1 change: 0 additions & 1 deletion lib/Migrator/macos3.json

This file was deleted.

Loading