mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Serialization] Add flag to force unsafe recovery from some xref failures
Intro a deserialization mode controlled by the flag `-experimental-force-workaround-broken-modules` to attempt unsafe recovery from deserialization failures caused by project issues. The one issue handled at this time is when a type moves from one module to another. With this new mode the compiler may be able to pick a matching type in a different module. This is risky to use, but may help in a pinch for a client to fix and issue in a library over which they have no control.
This commit is contained in:
@@ -564,6 +564,8 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
Opts.EnableDeserializationSafety
|
||||
= A->getOption().matches(OPT_enable_deserialization_safety);
|
||||
}
|
||||
Opts.ForceWorkaroundBrokenModules
|
||||
|= Args.hasArg(OPT_force_workaround_broken_modules);
|
||||
|
||||
// Whether '/.../' regex literals are enabled. This implies experimental
|
||||
// string processing.
|
||||
|
||||
Reference in New Issue
Block a user