[serialization] Serialize the header path used by -import-objc-header.

This doesn't handle cross-references to decls /loaded/ from the header
just yet, so all that's testable right now is whether the header's imports
are visible from the secondary target (after being imported in response
to loading the serialized module).

More of <rdar://problem/16702101>

Swift SVN r17638
This commit is contained in:
Jordan Rose
2014-05-07 19:03:21 +00:00
parent a0de0e411d
commit 465b083ba9
12 changed files with 102 additions and 29 deletions

View File

@@ -224,9 +224,9 @@ FileUnit *SerializedModuleLoader::loadAST(
loadedModuleFile->getDependencies().end(),
std::back_inserter(missing),
[&duplicates](const ModuleFile::Dependency &dependency) -> bool {
if (dependency.isLoaded())
if (dependency.isLoaded() || dependency.isHeader())
return false;
bool &seen = duplicates[dependency.RawAccessPath];
bool &seen = duplicates[dependency.RawPath];
if (seen)
return false;
seen = true;
@@ -237,13 +237,13 @@ FileUnit *SerializedModuleLoader::loadAST(
assert(!missing.empty() && "unknown missing dependency?");
if (missing.size() == 1) {
Ctx.Diags.diagnose(*diagLoc, diag::serialization_missing_single_dependency,
missing.begin()->RawAccessPath);
missing.begin()->RawPath);
} else {
llvm::SmallString<64> missingNames;
missingNames += '\'';
interleave(missing,
[&](const ModuleFile::Dependency &next) {
missingNames += next.RawAccessPath;
missingNames += next.RawPath;
},
[&] { missingNames += "', '"; });
missingNames += '\'';