mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
SIL: Introduce SILLinkage::PublicNonABI
This is going to be used for "always emit into client" functions, such as default argument generators and stored property initializers. - In dead function elimination, these functions behave identically to public functions, serving as "anchors" for the mark-and-sweep analysis. - There is no external variant of this linkage, because external declarations can use HiddenExternal linkage -- the definition should always be emitted by another translation unit in the same Swift module. - When deserialized, they receive shared linkage, because we want the linker to coalesce multiple copies of the same deserialized definition if it was deserialized from multiple translation units in the same Swift module. - When IRGen emits a definition with this linkage, it receives the same LLVM-level linkage as a hidden definition, ensuring it does not have a public entry point.
This commit is contained in:
@@ -54,7 +54,7 @@ const uint16_t VERSION_MAJOR = 0;
|
||||
/// in source control, you should also update the comment to briefly
|
||||
/// 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.
|
||||
const uint16_t VERSION_MINOR = 392; // Last change: accessor decls
|
||||
const uint16_t VERSION_MINOR = 393; // SILLinkage::PublicNonABI
|
||||
|
||||
using DeclIDField = BCFixed<31>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user