Merge pull request #37768 from xymus/swiftmodule-sdk

[Serialization] Restrict loading swiftmodule files to the SDK that built them
This commit is contained in:
Alexis Laferrière
2021-09-14 08:53:49 -07:00
committed by GitHub
22 changed files with 93 additions and 12 deletions

View File

@@ -777,6 +777,11 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
}
}
// Get the SDK name.
if (Arg *A = Args.getLastArg(options::OPT_target_sdk_name)) {
Opts.SDKName = A->getValue();
}
if (const Arg *A = Args.getLastArg(OPT_entry_point_function_name)) {
Opts.entryPointFunctionName = A->getValue();
}