abi-checker: allow ABI checker to deserialize @_implementationOnly modules on demand

This could prevent the tool from crashing when module recovery failed.
This commit is contained in:
Xi Ge
2020-08-11 10:40:56 -07:00
parent 4391f4264e
commit a8255f2601

View File

@@ -2548,6 +2548,8 @@ static int prepareForDump(const char *Main,
InitInvok.getLangOptions().Target.isOSDarwin();
InitInvok.getClangImporterOptions().ModuleCachePath =
options::ModuleCachePath;
// Module recovery issue shouldn't bring down the tool.
InitInvok.getLangOptions().AllowDeserializingImplementationOnly = true;
if (!options::SwiftVersion.empty()) {
using version::Version;