mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[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:
@@ -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 += '\'';
|
||||
|
||||
Reference in New Issue
Block a user