Files
rust/src/librustc_codegen_llvm
Josh Stone aafe2c6da9 Show better errors for LLVM IR output
I was trying to output LLVM IR directly to the console:

    $ rustc hello.rs --emit=llvm-ir -o /dev/stdout
    LLVM ERROR: IO failure on output stream: Bad file descriptor

Now `LLVMRustPrintModule` returns an error, and we print:

    error: failed to write LLVM IR to /dev/stdout.hello.7rcbfp3g-cgu.0.rcgu.ll: Permission denied

... which is more informative.
2019-04-05 17:48:23 -07:00
..
2019-04-01 13:41:41 -04:00
2019-03-29 17:17:13 +01:00
2019-03-29 17:17:13 +01:00
2019-03-30 21:37:02 +09:00
2018-12-25 21:08:33 -07:00
2019-02-18 03:58:58 +09:00
2019-03-30 22:37:02 +01:00
2019-02-18 03:58:58 +09:00
2018-12-25 21:08:33 -07:00
2019-02-18 03:58:58 +09:00
2019-02-18 03:58:58 +09:00
2018-11-26 15:03:13 -06:00
2019-03-19 17:07:09 +00:00

The codegen crate contains the code to convert from MIR into LLVM IR, and then from LLVM IR into machine code. In general it contains code that runs towards the end of the compilation process.

For more information about how codegen works, see the rustc guide.