Skip to main content

symbol_names_for_lto

Function symbol_names_for_lto 

Source
pub(crate) fn symbol_names_for_lto<'tcx>(
    tcx: TyCtxt<'tcx>,
    symbol: ExportedSymbol<'tcx>,
    instantiating_crate: CrateNum,
) -> Vec<String>
Expand description

Names used to preserve an exported symbol during LTO.

The restriction pass matches LLVM IR names, which retain the \x01 marker for explicitly decorated symbols. ThinLTO GUIDs instead use the identifier without that marker, so preserve both spellings.