Skip to content

Commit

Permalink
Unrolled build for rust-lang#134261
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#134261 - bjorn3:document_symbol_visibility, r=lqd

Document the symbol Visibility enum
  • Loading branch information
rust-timer authored Dec 14, 2024
2 parents a1740a9 + af3721e commit 757dd26
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions compiler/rustc_middle/src/mir/mono.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,22 @@ pub enum Linkage {
Common,
}

/// Specifies the symbol visibility with regards to dynamic linking.
///
/// Visibility doesn't have any effect when linkage is internal.
///
/// DSO means dynamic shared object, that is a dynamically linked executable or dylib.
#[derive(Copy, Clone, PartialEq, Debug, HashStable)]
pub enum Visibility {
/// Export the symbol from the DSO and apply overrides of the symbol by outside DSOs to within
/// the DSO if the object file format supports this.
Default,
/// Hide the symbol outside of the defining DSO even when external linkage is used to export it
/// from the object file.
Hidden,
/// Export the symbol from the DSO, but don't apply overrides of the symbol by outside DSOs to
/// within the DSO. Equivalent to default visibility with object file formats that don't support
/// overriding exported symbols by another DSO.
Protected,
}

Expand Down

0 comments on commit 757dd26

Please sign in to comment.