mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Serialization] Import incompatible targets when allowing errors
If allowing modules to be output with compile errors (-experimental-allow-module-with-errors), import targets regardless of whether they are compatible or not, and still output the module. The error diagnostic will still be output (preventing SILGen), but the AST will be available for various editor functionality.
This commit is contained in:
@@ -486,10 +486,14 @@ public:
|
||||
/// This does not include diagnostics about \e this file failing to load,
|
||||
/// but rather other things that might be imported as part of bringing the
|
||||
/// file into the AST.
|
||||
/// \param recoverFromIncompatibility Whether to associate the file
|
||||
/// regardless of the compatibility with the AST module. Still returns the
|
||||
/// underlying error for diagnostic purposes but does not set the error bit.
|
||||
///
|
||||
/// \returns any error that occurred during association, such as being
|
||||
/// compiled for a different OS.
|
||||
Status associateWithFileContext(FileUnit *file, SourceLoc diagLoc);
|
||||
Status associateWithFileContext(FileUnit *file, SourceLoc diagLoc,
|
||||
bool recoverFromIncompatibility);
|
||||
|
||||
/// Returns `true` if there is a buffer that might contain source code where
|
||||
/// other parts of the compiler could have emitted diagnostics, to indicate
|
||||
|
||||
Reference in New Issue
Block a user