Skip to content
  • Josh Stone's avatar
    Show better errors for LLVM IR output · aafe2c6d
    Josh Stone authored
    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.
    aafe2c6d