From 1a1cdac93054a850d2ebb647d045a33989aa812d Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Sat, 2 Jan 2021 16:59:23 +0100 Subject: [PATCH] Remove code that was moved from the backend to rustc_incremental --- src/driver/aot.rs | 7 ------- src/intrinsics/mod.rs | 2 +- src/lib.rs | 23 ++++++++--------------- 3 files changed, 9 insertions(+), 23 deletions(-) diff --git a/src/driver/aot.rs b/src/driver/aot.rs index 16f9bfc99189..df89883f0bbb 100644 --- a/src/driver/aot.rs +++ b/src/driver/aot.rs @@ -281,9 +281,6 @@ pub(super) fn run_aot( None }; - rustc_incremental::assert_dep_graph(tcx); - rustc_incremental::save_dep_graph(tcx); - let metadata_module = if need_metadata_module { let _timer = tcx.prof.generic_activity("codegen crate metadata"); let (metadata_cgu_name, tmp_file) = tcx.sess.time("write compressed metadata", || { @@ -322,10 +319,6 @@ pub(super) fn run_aot( None }; - if tcx.sess.opts.output_types.should_codegen() { - rustc_incremental::assert_module_sources::assert_module_sources(tcx); - } - Box::new(( CodegenResults { crate_name: tcx.crate_name(LOCAL_CRATE), diff --git a/src/intrinsics/mod.rs b/src/intrinsics/mod.rs index be5b247bb9f0..8946ac43bc65 100644 --- a/src/intrinsics/mod.rs +++ b/src/intrinsics/mod.rs @@ -824,7 +824,7 @@ pub(crate) fn codegen_intrinsic_call<'tcx>( } ty => unreachable!("bswap {}", ty), } - }; + } let res = CValue::by_val(swap(&mut fx.bcx, arg), fx.layout_of(T)); ret.write_cvalue(fx, res); }; diff --git a/src/lib.rs b/src/lib.rs index 6e4f3bf2898d..4b6431e42b53 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -27,7 +27,6 @@ extern crate rustc_incremental; extern crate rustc_index; extern crate rustc_session; extern crate rustc_span; -extern crate rustc_symbol_mangling; extern crate rustc_target; // This prevents duplicating functions and statics that are already part of the host rustc process. @@ -257,8 +256,6 @@ impl CodegenBackend for CraneliftCodegenBackend { }; let res = driver::codegen_crate(tcx, metadata, need_metadata_module, config); - rustc_symbol_mangling::test::report_symbol_names(tcx); - res } @@ -280,18 +277,14 @@ impl CodegenBackend for CraneliftCodegenBackend { ) -> Result<(), ErrorReported> { use rustc_codegen_ssa::back::link::link_binary; - let _timer = sess.prof.generic_activity("link_crate"); - - sess.time("linking", || { - let target_cpu = crate::target_triple(sess).to_string(); - link_binary::>( - sess, - &codegen_results, - outputs, - &codegen_results.crate_name.as_str(), - &target_cpu, - ); - }); + let target_cpu = crate::target_triple(sess).to_string(); + link_binary::>( + sess, + &codegen_results, + outputs, + &codegen_results.crate_name.as_str(), + &target_cpu, + ); Ok(()) }