Add support for hidden visibility

This commit is contained in:
bjorn3
2020-03-16 11:21:18 +01:00
parent ec90509387
commit b4562c62e3
3 changed files with 27 additions and 8 deletions

View File

@@ -474,6 +474,7 @@ fn translate_linkage(linkage: Linkage) -> (SymbolScope, bool) {
let scope = match linkage {
Linkage::Import => SymbolScope::Unknown,
Linkage::Local => SymbolScope::Compilation,
Linkage::Hidden => SymbolScope::Linkage,
Linkage::Export | Linkage::Preemptible => SymbolScope::Dynamic,
};
// TODO: this matches rustc_codegen_cranelift, but may be wrong.