Merge pull request #17186 from jrose-apple/bridge-over-troubled-imports

[Serialization] Always list the bridging header before any imports

rdar://problem/40471329
This commit is contained in:
Jordan Rose
2018-06-18 10:42:09 -07:00
committed by GitHub
11 changed files with 97 additions and 19 deletions

View File

@@ -1456,6 +1456,17 @@ Status ModuleFile::associateWithFileContext(FileUnit *file,
return getStatus();
}
std::unique_ptr<llvm::MemoryBuffer> ModuleFile::takeBufferForDiagnostics() {
assert(getStatus() != Status::Valid);
// Today, the only buffer that might have diagnostics in them is the input
// buffer, and even then only if it has imported module contents.
if (!importedHeaderInfo.contents.empty())
return std::move(ModuleInputBuffer);
return nullptr;
}
ModuleFile::~ModuleFile() { }
void ModuleFile::lookupValue(DeclName name,