@@ -67,7 +67,7 @@ use derive_registrar;
67
67
68
68
use profile;
69
69
70
- pub fn compile_input ( sess : & Session ,
70
+ pub fn compile_input < Trans : TransCrate > ( sess : & Session ,
71
71
cstore : & CStore ,
72
72
input : & Input ,
73
73
outdir : & Option < PathBuf > ,
@@ -207,7 +207,7 @@ pub fn compile_input(sess: &Session,
207
207
None
208
208
} ;
209
209
210
- phase_3_run_analysis_passes ( sess,
210
+ phase_3_run_analysis_passes< Trans , _ , _> ( sess,
211
211
cstore,
212
212
hir_map,
213
213
analysis,
@@ -244,7 +244,7 @@ pub fn compile_input(sess: &Session,
244
244
tcx. print_debug_stats ( ) ;
245
245
}
246
246
247
- let trans = phase_4_translate_to_llvm :: < DefaultTransCrate > ( tcx, rx) ;
247
+ let trans = phase_4_translate_to_llvm :: < Trans > ( tcx, rx) ;
248
248
249
249
if log_enabled ! ( :: log:: LogLevel :: Info ) {
250
250
println ! ( "Post-trans" ) ;
@@ -267,7 +267,7 @@ pub fn compile_input(sess: &Session,
267
267
}
268
268
269
269
let ( phase5_result, trans) =
270
- phase_5_run_llvm_passes :: < DefaultTransCrate > ( sess, & dep_graph, trans) ;
270
+ phase_5_run_llvm_passes :: < Trans > ( sess, & dep_graph, trans) ;
271
271
272
272
controller_entry_point ! ( after_llvm,
273
273
sess,
@@ -278,7 +278,7 @@ pub fn compile_input(sess: &Session,
278
278
// Run the linker on any artifacts that resulted from the LLVM run.
279
279
// This should produce either a finished executable or library.
280
280
time ( sess. time_passes ( ) , "linking" , || {
281
- DefaultTransCrate :: link_binary ( sess, & trans, & outputs)
281
+ Trans :: link_binary ( sess, & trans, & outputs)
282
282
} ) ;
283
283
284
284
// Now that we won't touch anything in the incremental compilation directory
@@ -910,7 +910,7 @@ pub fn phase_2_configure_and_expand<F>(sess: &Session,
910
910
/// Run the resolution, typechecking, region checking and other
911
911
/// miscellaneous analysis passes on the crate. Return various
912
912
/// structures carrying the results of the analysis.
913
- pub fn phase_3_run_analysis_passes < ' tcx , F , R > ( sess : & ' tcx Session ,
913
+ pub fn phase_3_run_analysis_passes < ' tcx , Trans : TransCrate , F , R > ( sess : & ' tcx Session ,
914
914
cstore : & ' tcx CrateStore ,
915
915
hir_map : hir_map:: Map < ' tcx > ,
916
916
mut analysis : ty:: CrateAnalysis ,
@@ -966,7 +966,7 @@ pub fn phase_3_run_analysis_passes<'tcx, F, R>(sess: &'tcx Session,
966
966
mir:: provide ( & mut local_providers) ;
967
967
reachable:: provide ( & mut local_providers) ;
968
968
rustc_privacy:: provide ( & mut local_providers) ;
969
- DefaultTransCrate :: provide_local ( & mut local_providers) ;
969
+ Trans :: provide_local ( & mut local_providers) ;
970
970
typeck:: provide ( & mut local_providers) ;
971
971
ty:: provide ( & mut local_providers) ;
972
972
traits:: provide ( & mut local_providers) ;
@@ -979,7 +979,7 @@ pub fn phase_3_run_analysis_passes<'tcx, F, R>(sess: &'tcx Session,
979
979
980
980
let mut extern_providers = ty:: maps:: Providers :: default ( ) ;
981
981
cstore:: provide ( & mut extern_providers) ;
982
- DefaultTransCrate :: provide_extern ( & mut extern_providers) ;
982
+ Trans :: provide_extern ( & mut extern_providers) ;
983
983
ty:: provide_extern ( & mut extern_providers) ;
984
984
traits:: provide_extern ( & mut extern_providers) ;
985
985
// FIXME(eddyb) get rid of this once we replace const_eval with miri.
0 commit comments