mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[BrdigingHeader] Auto bridging header chaining
Add ability to automatically chaining the bridging headers discovered from all dependencies module when doing swift caching build. This will eliminate all implicit bridging header imports from the build and make the bridging header importing behavior much more reliable, while keep the compatibility at maximum. For example, if the current module A depends on module B and C, and both B and C are binary modules that uses bridging header, when building module A, dependency scanner will construct a new header that chains three bridging headers together with the option to build a PCH from it. This will make all importing errors more obvious while improving the performance.
This commit is contained in:
@@ -601,7 +601,7 @@ public:
|
||||
|
||||
/// Outputs information useful for diagnostics to \p out
|
||||
void outputDiagnosticInfo(llvm::raw_ostream &os) const;
|
||||
|
||||
|
||||
// Out of line to avoid instantiation OnDiskChainedHashTable here.
|
||||
~ModuleFileSharedCore();
|
||||
|
||||
@@ -653,6 +653,12 @@ public:
|
||||
return MacroModuleNames;
|
||||
}
|
||||
|
||||
/// Get embedded bridging header.
|
||||
std::string getEmbeddedHeader() const {
|
||||
// Don't include the '\0' in the end.
|
||||
return importedHeaderInfo.contents.drop_back().str();
|
||||
}
|
||||
|
||||
/// If the module-defining `.swiftinterface` file is an SDK-relative path,
|
||||
/// resolve it to be absolute to the specified SDK.
|
||||
std::string resolveModuleDefiningFilePath(const StringRef SDKPath) const;
|
||||
|
||||
Reference in New Issue
Block a user