pub fn phase_5_run_llvm_passes(sess: Session,
                               trans: &CrateTranslation,
                               outputs: &OutputFilenames) {

    if sess.no_integrated_as() {
        let output_type = link::OutputTypeAssembly;
        let asm_filename = outputs.obj_filename.with_extension("s");

        time(sess.time_passes(), "LLVM passes", (), |_|
            link::write::run_passes(sess,
                                    trans,
                                    output_type,
                                    &asm_filename));

        link::write::run_assembler(sess, &asm_filename, &outputs.obj_filename);

        // Remove assembly source, unless --save-temps was specified
        if !sess.opts.save_temps {
            fs::unlink(&asm_filename);
        }
    } else {
        time(sess.time_passes(), "LLVM passes", (), |_|
            link::write::run_passes(sess,
                                    trans,
                                    sess.opts.output_type,
                                    &outputs.obj_filename));
    }
}
/// 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: &CrateTranslation,
                               outputs: &OutputFilenames) {
    if sess.no_integrated_as() {
        let output_type = link::OutputTypeAssembly;
        let asm_filename = outputs.obj_filename.with_extension("s");
        time(sess.time_passes(), "LLVM passes", (), |_|
            link::write::run_passes(sess,
                                    trans,
                                    output_type,
                                    &asm_filename));
        link::write::run_assembler(sess, &asm_filename, &outputs.obj_filename);
        // Remove assembly source, unless --save-temps was specified
        if !sess.opts.save_temps {
            fs::unlink(&asm_filename);
        }
    } else {
        time(sess.time_passes(), "LLVM passes", (), |_|
            link::write::run_passes(sess,
                                    trans,
                                    sess.opts.output_type,
                                    &outputs.obj_filename));
    }
}
pub fn phase_5_run_llvm_passes ( sess : Session , trans : & CrateTranslation , outputs : & OutputFilenames ) { if sess . no_integrated_as ( ) { let output_type = link :: OutputTypeAssembly ; let asm_filename = outputs . obj_filename . with_extension ( " " ) ; time ( sess . time_passes ( ) , " " , ( ) , | _ | link :: write :: run_passes ( sess , trans , output_type , & asm_filename ) ) ; link :: write :: run_assembler ( sess , & asm_filename , & outputs . obj_filename ) ; // Remove assembly source, unless --save-temps was specified if ! sess . opts . save_temps { fs :: unlink ( & asm_filename ) ; } } else { time ( sess . time_passes ( ) , " " , ( ) , | _ | link :: write :: run_passes ( sess , trans , sess . opts . output_type , & outputs . obj_filename ) ) ; } }
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
&CrateTranslation
outputs
&OutputFilenames
sess
Session
trans
&CrateTranslation
outputs
&OutputFilenames