Remove the (inaccurate) symbol_export_level query.
This commit is contained in:
parent
8d95c86974
commit
e203b3ab71
5 changed files with 4 additions and 9 deletions
|
|
@ -648,8 +648,6 @@ define_dep_nodes!( <'tcx>
|
|||
|
||||
[] InstanceDefSizeEstimate { instance_def: InstanceDef<'tcx> },
|
||||
|
||||
[] GetSymbolExportLevel(DefId),
|
||||
|
||||
[] WasmCustomSections(CrateNum),
|
||||
|
||||
[input] Features,
|
||||
|
|
|
|||
|
|
@ -390,7 +390,6 @@ define_maps! { <'tcx>
|
|||
[] fn collect_and_partition_translation_items:
|
||||
collect_and_partition_translation_items_node(CrateNum)
|
||||
-> (Arc<DefIdSet>, Arc<Vec<Arc<CodegenUnit<'tcx>>>>),
|
||||
[] fn symbol_export_level: GetSymbolExportLevel(DefId) -> SymbolExportLevel,
|
||||
[] fn is_translated_item: IsTranslatedItem(DefId) -> bool,
|
||||
[] fn codegen_unit: CodegenUnit(InternedString) -> Arc<CodegenUnit<'tcx>>,
|
||||
[] fn compile_codegen_unit: CompileCodegenUnit(InternedString) -> Stats,
|
||||
|
|
|
|||
|
|
@ -1087,7 +1087,6 @@ pub fn force_from_dep_node<'a, 'gcx, 'lcx>(tcx: TyCtxt<'a, 'gcx, 'lcx>,
|
|||
|
||||
DepKind::TargetFeaturesWhitelist => { force!(target_features_whitelist, LOCAL_CRATE); }
|
||||
|
||||
DepKind::GetSymbolExportLevel => { force!(symbol_export_level, def_id!()); }
|
||||
DepKind::Features => { force!(features_query, LOCAL_CRATE); }
|
||||
|
||||
DepKind::ProgramClausesFor => { force!(program_clauses_for, def_id!()); }
|
||||
|
|
|
|||
|
|
@ -328,7 +328,8 @@ fn place_root_translation_items<'a, 'tcx, I>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
|||
let mut can_be_internalized = true;
|
||||
let default_visibility = |id: DefId| {
|
||||
if tcx.sess.target.target.options.default_hidden_visibility &&
|
||||
tcx.symbol_export_level(id) != SymbolExportLevel::C
|
||||
tcx.reachable_non_generics(id.krate).get(&id).cloned() !=
|
||||
Some(SymbolExportLevel::C)
|
||||
{
|
||||
Visibility::Hidden
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ fn reachable_non_generics_provider<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
|||
SymbolExportLevel::Rust
|
||||
}
|
||||
} else {
|
||||
tcx.symbol_export_level(def_id)
|
||||
symbol_export_level(tcx, def_id)
|
||||
};
|
||||
debug!("EXPORTED SYMBOL (local): {} ({:?})",
|
||||
tcx.symbol_name(Instance::mono(tcx, def_id)),
|
||||
|
|
@ -314,17 +314,15 @@ pub fn provide(providers: &mut Providers) {
|
|||
providers.reachable_non_generics = reachable_non_generics_provider;
|
||||
providers.is_reachable_non_generic = is_reachable_non_generic_provider_local;
|
||||
providers.exported_symbols = exported_symbols_provider_local;
|
||||
providers.symbol_export_level = symbol_export_level_provider;
|
||||
providers.upstream_monomorphizations = upstream_monomorphizations_provider;
|
||||
}
|
||||
|
||||
pub fn provide_extern(providers: &mut Providers) {
|
||||
providers.is_reachable_non_generic = is_reachable_non_generic_provider_extern;
|
||||
providers.symbol_export_level = symbol_export_level_provider;
|
||||
providers.upstream_monomorphizations_for = upstream_monomorphizations_for_provider;
|
||||
}
|
||||
|
||||
fn symbol_export_level_provider(tcx: TyCtxt, sym_def_id: DefId) -> SymbolExportLevel {
|
||||
fn symbol_export_level(tcx: TyCtxt, sym_def_id: DefId) -> SymbolExportLevel {
|
||||
// We export anything that's not mangled at the "C" layer as it probably has
|
||||
// to do with ABI concerns. We do not, however, apply such treatment to
|
||||
// special symbols in the standard library for various plumbing between
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue