pub fn phase_5_run_llvm_passes(sess: &Session,
                               trans: &trans::CrateTranslation,
                               outputs: &OutputFilenames) {
    if sess.opts.cg.no_integrated_as {
        let output_type = config::OutputTypeAssembly;

        time(sess.time_passes(), "LLVM passes", (), |_|
            write::run_passes(sess, trans, &[output_type], outputs));

        write::run_assembler(sess, outputs);

        // Remove assembly source, unless --save-temps was specified
        if !sess.opts.cg.save_temps {
            fs::unlink(&outputs.temp_path(config::OutputTypeAssembly)).unwrap();
        }
    } else {
        time(sess.time_passes(), "LLVM passes", (), |_|
            write::run_passes(sess,
                              trans,
                              sess.opts.output_types.as_slice(),
                              outputs));
    }

    sess.abort_if_errors();
}
/// Run LLVM itself, producing a bitcode file, assembly file or object file
/// as a side effect.
Run LLVM itself, producing a bitcode file, assembly file or object file
as a side effect.
Run LLVM itself producing a bitcode file assembly file or object file as a side effect .
pub fn phase_5_run_llvm_passes(sess: &Session,
                               trans: &trans::CrateTranslation,
                               outputs: &OutputFilenames) {
    if sess.opts.cg.no_integrated_as {
        let output_type = config::OutputTypeAssembly;
        time(sess.time_passes(), "LLVM passes", (), |_|
            write::run_passes(sess, trans, &[output_type], outputs));
        write::run_assembler(sess, outputs);
        // Remove assembly source, unless --save-temps was specified
        if !sess.opts.cg.save_temps {
            fs::unlink(&outputs.temp_path(config::OutputTypeAssembly)).unwrap();
        }
    } else {
        time(sess.time_passes(), "LLVM passes", (), |_|
            write::run_passes(sess,
                              trans,
                              sess.opts.output_types.as_slice(),
                              outputs));
    }
    sess.abort_if_errors();
}
pub fn phase_5_run_llvm_passes ( sess : & Session , trans : & trans :: CrateTranslation , outputs : & OutputFilenames ) { if sess . opts . cg . no_integrated_as { let output_type = config :: OutputTypeAssembly ; time ( sess . time_passes ( ) , " " , ( ) , | _ | write :: run_passes ( sess , trans , & [ output_type ] , outputs ) ) ; write :: run_assembler ( sess , outputs ) ; // Remove assembly source, unless --save-temps was specified if ! sess . opts . cg . save_temps { fs :: unlink ( & outputs . temp_path ( config :: OutputTypeAssembly ) ) . unwrap ( ) ; } } else { time ( sess . time_passes ( ) , " " , ( ) , | _ | write :: run_passes ( sess , trans , sess . opts . output_types . as_slice ( ) , outputs ) ) ; } sess . abort_if_errors ( ) ; }
Run LLVM itself, producing a bitcode file, assembly file or object file
as a side effect.
Run LLVM itself producing a bitcode file assembly file or object file as a side effect .
sess
&Session
trans
&trans::CrateTranslation
outputs
&OutputFilenames