Enum llvm::Linkage [] [src]

pub enum Linkage {
    External,
    AvailableExternally,
    LinkOnceAny,
    LinkOnceODR,
    WeakAny,
    WeakODR,
    Appending,
    Internal,
    Private,
    ExternalWeak,
    Common,
}

A way of indicating to LLVM how you want a global to interact during linkage.

Variants

External

Default linkage. The global is externally visible and participates in linkage normally.

AvailableExternally

Never emitted to the containing module's object file. Used to allow inlining and/or other optimisations to take place, given knowledge of the definition of the global, which is somewhere outside of the module. Otherwise the same as LinkOnceODR. Only allowed on definitions, not declarations.

LinkOnceAny

Merged with other globals of the same name during linkage. Unreferenced LinkOnce globals may be discarded.

LinkOnceODR

Similar to LinkOnceAny, but indicates that it will only be merged with equivalent globals.

WeakAny

Same merging semantics as LinkOnceAny. Unlike LinkOnce, unreference globals will not be discarded.

WeakODR

Similar to WeakAny, but indicates that it will only be merged with equivalent globals.

Appending

Only allowed on global array pointers. When two globals with Appending linkage are merged, they are appended together.

Internal

Similar to Private, but shows as a local symbol in the object file.

Private

Only directly accessible by objects in the current module. May be renamed as neccessary to avoid collisions, and all references will be updated. Will not show up in the object file's symbol table.

ExternalWeak

Weak until linked. If not linked, the output symbol is null, instead of undefined.

Common

Similar to Weak, but may not have an explicit section, must have a zero initializer, and may not be marked constant. Cannot be used on functions or aliases.

Trait Implementations

impl From<LLVMLinkage> for Linkage
[src]

fn from(attr: LLVMLinkage) -> Linkage

Performs the conversion.

Derived Implementations

impl Debug for Linkage
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl PartialEq for Linkage
[src]

fn eq(&self, __arg_0: &Linkage) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Rhs) -> bool
1.0.0

This method tests for !=.

impl Eq for Linkage
[src]

impl Clone for Linkage
[src]

fn clone(&self) -> Linkage

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Copy for Linkage
[src]