mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[cxx-interop] compilations that do not enable C++ interoperability should not be able to import modules that do enable C++ interoperability by default
A supplemental hidden frontend option allows advanced users to opt-out of this requirement. Fixes https://github.com/apple/swift/issues/65833 Fixes https://github.com/apple/swift/issues/65832
This commit is contained in:
@@ -58,7 +58,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
|
||||
/// describe what change you made. The content of this comment isn't important;
|
||||
/// it just ensures a conflict if two people change the module format.
|
||||
/// Don't worry about adhering to the 80-column limit for this line.
|
||||
const uint16_t SWIFTMODULE_VERSION_MINOR = 790; // add `out` kind to mark uninitialized instruction
|
||||
const uint16_t SWIFTMODULE_VERSION_MINOR = 791; // HasCxxInteroperability
|
||||
|
||||
/// A standard hash seed used for all string hashes in a serialized module.
|
||||
///
|
||||
@@ -888,6 +888,7 @@ namespace options_block {
|
||||
EXTERNAL_SEARCH_PLUGIN_PATH,
|
||||
COMPILER_PLUGIN_LIBRARY_PATH,
|
||||
COMPILER_PLUGIN_EXECUTABLE_PATH,
|
||||
HAS_CXX_INTEROPERABILITY_ENABLED,
|
||||
};
|
||||
|
||||
using SDKPathLayout = BCRecordLayout<
|
||||
@@ -976,6 +977,10 @@ namespace options_block {
|
||||
MODULE_EXPORT_AS_NAME,
|
||||
BCBlob
|
||||
>;
|
||||
|
||||
using HasCxxInteroperabilityEnabledLayout = BCRecordLayout<
|
||||
HAS_CXX_INTEROPERABILITY_ENABLED
|
||||
>;
|
||||
}
|
||||
|
||||
/// The record types within the input block.
|
||||
|
||||
Reference in New Issue
Block a user