pub enum Linkage {
External = 0,
AvailableExternally = 1,
LinkOnceAny = 2,
LinkOnceODR = 3,
WeakAny = 5,
WeakODR = 6,
Appending = 7,
Internal = 8,
Private = 9,
ExternalWeak = 12,
Common = 14,
}
Expand description
A renamed LLVMLinkage
Some deprecated values have been removed, see LLVMLinkage
Variants§
External = 0
The default, externally visible linkage type
AvailableExternally = 1
Globals will not be emitted to the object file and definitions will be used for optimization purposes, allowing inlining and discarding
LinkOnceAny = 2
Globals are merged with other globals of the same name during linkage and unused globals are discarded
LinkOnceODR = 3
Similar to LinkOnceAny
, but it allows further optimizations by ensuring that only globals
with equivalent definitions are merged
WeakAny = 5
Similar to LinkOnceAny
, but unused globals are not discarded
WeakODR = 6
Similar to LinkOnceODR
, but unused globals are not discarded
Appending = 7
Global arrays are appended together when linkage occurs
Internal = 8
Similar to Private
, but values are represented as local symbols
Private = 9
Globals are only directly accessible by objects in the current module
ExternalWeak = 12
The symbol is Weak
until linked, otherwise it becomes null instead of undefined
Common = 14
Used for tentative definitions at global scope, similar to Weak