about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2017-07-26 16:12:34 +0200
committerMichael Woerister <michaelwoerister@posteo.net>2017-07-31 15:15:09 +0200
commitab3bc584c0412e31efd7b92ef77b7cebfa555926 (patch)
tree7c808df6258ec0ea6137eb469c337d1c6d0d630a /src
parent81b789fd879b8dcafe9d6acc06fdc71261c520fb (diff)
downloadrust-ab3bc584c0412e31efd7b92ef77b7cebfa555926.tar.gz
rust-ab3bc584c0412e31efd7b92ef77b7cebfa555926.zip
async-llvm(20): Do some cleanup.
Diffstat (limited to 'src')
-rw-r--r--src/librustc_trans/back/write.rs45
-rw-r--r--src/librustc_trans/base.rs4
2 files changed, 24 insertions, 25 deletions
diff --git a/src/librustc_trans/back/write.rs b/src/librustc_trans/back/write.rs
index 6c12a4989f5..f792da01cde 100644
--- a/src/librustc_trans/back/write.rs
+++ b/src/librustc_trans/back/write.rs
@@ -341,7 +341,7 @@ pub struct CodegenContext {
     // compiling incrementally
     pub incr_comp_session_dir: Option<PathBuf>,
     // Channel back to the main control thread to send messages to
-    pub coordinator_send: Sender<Message>,
+    coordinator_send: Sender<Message>,
 }
 
 impl CodegenContext {
@@ -660,17 +660,17 @@ fn need_crate_bitcode_for_rlib(sess: &Session) -> bool {
     sess.opts.output_types.contains_key(&OutputType::Exe)
 }
 
-pub fn run_passes(sess: &Session,
-                  crate_output: &OutputFilenames,
-                  crate_name: Symbol,
-                  link: LinkMeta,
-                  metadata: EncodedMetadata,
-                  exported_symbols: Arc<ExportedSymbols>,
-                  no_builtins: bool,
-                  windows_subsystem: Option<String>,
-                  linker_info: LinkerInfo,
-                  no_integrated_as: bool)
-                  -> OngoingCrateTranslation {
+pub fn start_async_translation(sess: &Session,
+                               crate_output: &OutputFilenames,
+                               crate_name: Symbol,
+                               link: LinkMeta,
+                               metadata: EncodedMetadata,
+                               exported_symbols: Arc<ExportedSymbols>,
+                               no_builtins: bool,
+                               windows_subsystem: Option<String>,
+                               linker_info: LinkerInfo,
+                               no_integrated_as: bool)
+                               -> OngoingCrateTranslation {
     let output_types_override = if no_integrated_as {
         OutputTypes::new(&[(OutputType::Assembly, None)])
     } else {
@@ -1061,7 +1061,7 @@ fn execute_work_item(cgcx: &CodegenContext, work_item: WorkItem)
 }
 
 #[derive(Debug)]
-pub enum Message {
+enum Message {
     Token(io::Result<Acquired>),
     Done { result: Result<CompiledModule, ()> },
     WorkItem(WorkItem),
@@ -1069,8 +1069,7 @@ pub enum Message {
     TranslationDone,
 }
 
-
-pub struct Diagnostic {
+struct Diagnostic {
     msg: String,
     code: Option<String>,
     lvl: Level,
@@ -1519,14 +1518,14 @@ impl SharedEmitterMain {
 }
 
 pub struct OngoingCrateTranslation {
-    pub crate_name: Symbol,
-    pub link: LinkMeta,
-    pub metadata: EncodedMetadata,
-    pub exported_symbols: Arc<ExportedSymbols>,
-    pub no_builtins: bool,
-    pub windows_subsystem: Option<String>,
-    pub linker_info: LinkerInfo,
-    pub no_integrated_as: bool,
+    crate_name: Symbol,
+    link: LinkMeta,
+    metadata: EncodedMetadata,
+    exported_symbols: Arc<ExportedSymbols>,
+    no_builtins: bool,
+    windows_subsystem: Option<String>,
+    linker_info: LinkerInfo,
+    no_integrated_as: bool,
 
     output_filenames: OutputFilenames,
     regular_module_config: ModuleConfig,
diff --git a/src/librustc_trans/base.rs b/src/librustc_trans/base.rs
index 0137fa08693..2e6093eb1ca 100644
--- a/src/librustc_trans/base.rs
+++ b/src/librustc_trans/base.rs
@@ -962,7 +962,7 @@ pub fn trans_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
        !tcx.sess.opts.output_types.should_trans() {
         let empty_exported_symbols = ExportedSymbols::empty();
         let linker_info = LinkerInfo::new(&shared_ccx, &empty_exported_symbols);
-        let ongoing_translation = write::run_passes(
+        let ongoing_translation = write::start_async_translation(
             tcx.sess,
             output_filenames,
             tcx.crate_name(LOCAL_CRATE),
@@ -1012,7 +1012,7 @@ pub fn trans_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
          (output_filenames.outputs.contains_key(&OutputType::Object) ||
           output_filenames.outputs.contains_key(&OutputType::Exe)));
 
-    let ongoing_translation = write::run_passes(
+    let ongoing_translation = write::start_async_translation(
         tcx.sess,
         output_filenames,
         tcx.crate_name(LOCAL_CRATE),