mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Failure to load a bridging header -> failure to load a module.
This is important for both test targets and for debugging. rdar://problem/20616099 Swift SVN r30784
This commit is contained in:
@@ -1026,10 +1026,15 @@ Status ModuleFile::associateWithFileContext(FileUnit *file,
|
||||
// The path may be empty if the file being loaded is a partial AST,
|
||||
// and the current compiler invocation is a merge-modules step.
|
||||
if (!dependency.RawPath.empty()) {
|
||||
clangImporter->importHeader(dependency.RawPath, file->getParentModule(),
|
||||
importedHeaderInfo.fileSize,
|
||||
importedHeaderInfo.fileModTime,
|
||||
importedHeaderInfo.contents, diagLoc);
|
||||
bool hadError =
|
||||
clangImporter->importHeader(dependency.RawPath,
|
||||
file->getParentModule(),
|
||||
importedHeaderInfo.fileSize,
|
||||
importedHeaderInfo.fileModTime,
|
||||
importedHeaderInfo.contents,
|
||||
diagLoc);
|
||||
if (hadError)
|
||||
return error(Status::FailedToLoadBridgingHeader);
|
||||
}
|
||||
Module *importedHeaderModule = clangImporter->getImportedHeaderModule();
|
||||
dependency.Import = { {}, importedHeaderModule };
|
||||
|
||||
Reference in New Issue
Block a user