Replace -Z default-hidden-visibility with -Z default-visibility
MCP: https://github.com/rust-lang/compiler-team/issues/782 Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
This commit is contained in:
parent
fb4aebddd1
commit
f48194ea55
14 changed files with 208 additions and 81 deletions
|
@ -4,6 +4,7 @@
|
|||
use std::marker::PhantomData;
|
||||
|
||||
use libc::{c_char, c_int, c_uint, c_ulonglong, c_void, size_t};
|
||||
use rustc_target::spec::SymbolVisibility;
|
||||
|
||||
use super::RustString;
|
||||
use super::debuginfo::{
|
||||
|
@ -133,6 +134,16 @@ pub enum Visibility {
|
|||
Protected = 2,
|
||||
}
|
||||
|
||||
impl Visibility {
|
||||
pub fn from_generic(visibility: SymbolVisibility) -> Self {
|
||||
match visibility {
|
||||
SymbolVisibility::Hidden => Visibility::Hidden,
|
||||
SymbolVisibility::Protected => Visibility::Protected,
|
||||
SymbolVisibility::Interposable => Visibility::Default,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// LLVMUnnamedAddr
|
||||
#[repr(C)]
|
||||
pub enum UnnamedAddr {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue