1
Fork 0

Remove Linkage::Private

This is the same as Linkage::Internal except that it doesn't emit any
symbol. Some backends may not support it and it isn't all that useful
anyway.
This commit is contained in:
bjorn3 2025-02-07 14:47:21 +00:00
parent 550e035a59
commit 382e4031c2
10 changed files with 4 additions and 19 deletions

View file

@ -49,7 +49,6 @@ fn linkage_by_name(tcx: TyCtxt<'_>, def_id: LocalDefId, name: &str) -> Linkage {
"internal" => Internal,
"linkonce" => LinkOnceAny,
"linkonce_odr" => LinkOnceODR,
"private" => Private,
"weak" => WeakAny,
"weak_odr" => WeakODR,
_ => tcx.dcx().span_fatal(tcx.def_span(def_id), "invalid linkage specified"),

View file

@ -187,7 +187,7 @@ fn prefix_and_suffix<'tcx>(
}
}
}
Linkage::Internal | Linkage::Private => {
Linkage::Internal => {
// write nothing
}
Linkage::Appending => emit_fatal("Only global variables can have appending linkage!"),