Skip to content

Commit ea60335

Browse files
committed
Add top level provide/provide_extern to cg_ssa and cg_utils
1 parent bcb01bc commit ea60335

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

src/librustc_codegen_ssa/lib.rs

+11
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ use rustc::dep_graph::WorkProduct;
2727
use rustc::session::config::{OutputFilenames, OutputType};
2828
use rustc::middle::lang_items::LangItem;
2929
use rustc::hir::def_id::CrateNum;
30+
use rustc::ty::query::Providers;
3031
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
3132
use rustc_data_structures::sync::Lrc;
3233
use rustc_data_structures::svh::Svh;
@@ -155,3 +156,13 @@ pub struct CodegenResults {
155156
pub linker_info: back::linker::LinkerInfo,
156157
pub crate_info: CrateInfo,
157158
}
159+
160+
pub fn provide(providers: &mut Providers<'_>) {
161+
crate::back::symbol_export::provide(providers);
162+
crate::base::provide_both(providers);
163+
}
164+
165+
pub fn provide_extern(providers: &mut Providers<'_>) {
166+
crate::back::symbol_export::provide_extern(providers);
167+
crate::base::provide_both(providers);
168+
}

src/librustc_codegen_utils/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
extern crate rustc;
1919

2020
use rustc::ty::TyCtxt;
21+
use rustc::ty::query::Providers;
2122
use rustc::hir::def_id::LOCAL_CRATE;
2223
use syntax::symbol::sym;
2324

@@ -37,3 +38,7 @@ pub fn check_for_rustc_errors_attr(tcx: TyCtxt<'_>) {
3738
}
3839
}
3940
}
41+
42+
pub fn provide(providers: &mut Providers<'_>) {
43+
crate::symbol_names::provide(providers);
44+
}

src/librustc_interface/passes.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -789,15 +789,13 @@ pub fn default_provide(providers: &mut ty::query::Providers<'_>) {
789789
cstore::provide(providers);
790790
lint::provide(providers);
791791
rustc_lint::provide(providers);
792-
rustc_codegen_utils::symbol_names::provide(providers);
793-
rustc_codegen_ssa::back::symbol_export::provide(providers);
794-
rustc_codegen_ssa::base::provide_both(providers);
792+
rustc_codegen_utils::provide(providers);
793+
rustc_codegen_ssa::provide(providers);
795794
}
796795

797796
pub fn default_provide_extern(providers: &mut ty::query::Providers<'_>) {
798797
cstore::provide_extern(providers);
799-
rustc_codegen_ssa::back::symbol_export::provide_extern(providers);
800-
rustc_codegen_ssa::base::provide_both(providers);
798+
rustc_codegen_ssa::provide_extern(providers);
801799
}
802800

803801
declare_box_region_type!(

0 commit comments

Comments
 (0)