Merge remote-tracking branch 'origin/master' into master-next

This commit is contained in:
swift-ci
2019-08-16 08:50:45 -07:00
8 changed files with 96 additions and 24 deletions

View File

@@ -229,6 +229,10 @@ int main(int argc, char **argv) {
desc("The directory that holds the compiler resource files"),
cat(Visible));
opt<bool> DummyDWARFImporter(
"dummy-dwarfimporter",
desc("Install a dummy DWARFImporterDelegate"), cat(Visible));
ParseCommandLineOptions(argc, argv);
// Unregister our options so they don't interfere with the command line
@@ -305,6 +309,13 @@ int main(int argc, char **argv) {
return 1;
}
swift::DWARFImporterDelegate dummyDWARFImporter;
if (DummyDWARFImporter) {
auto *ClangImporter = static_cast<swift::ClangImporter *>(
CI.getASTContext().getClangModuleLoader());
ClangImporter->setDWARFImporterDelegate(dummyDWARFImporter);
}
for (auto &Module : Modules)
if (!parseASTSection(*CI.getMemoryBufferSerializedModuleLoader(),
StringRef(Module.first, Module.second), modules)) {