[Frontend] Make the module trace emission more robust.

✔ More informative error messages in case of crashes.
✔ Handling and documenting different cases.
✔ Test cases for different cases.
✔ Make SDKDependencies.swift pass again.
This commit is contained in:
Varun Gandhi
2019-10-11 17:13:30 -07:00
parent f969320883
commit 903add2c3f
12 changed files with 258 additions and 81 deletions

View File

@@ -113,6 +113,7 @@ protected:
auto error =
loader->findModuleFilesInDirectory({moduleName, SourceLoc()}, tempDir,
"Library.swiftmodule", "Library.swiftdoc", "Library.swiftsourceinfo",
/*ModuleInterfacePath*/nullptr,
&moduleBuffer, &moduleDocBuffer, &moduleSourceInfoBuffer);
ASSERT_FALSE(error);
ASSERT_FALSE(diags.hadAnyError());