Commit aafe2c6
committed
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.1 parent acd8dd6 commit aafe2c6
File tree
3 files changed
+26
-13
lines changed- src
- librustc_codegen_llvm
- back
- llvm
- rustllvm
3 files changed
+26
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 78 | + | |
| 79 | + | |
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
| |||
505 | 503 | | |
506 | 504 | | |
507 | 505 | | |
508 | | - | |
| 506 | + | |
| 507 | + | |
509 | 508 | | |
510 | 509 | | |
511 | 510 | | |
| |||
520 | 519 | | |
521 | 520 | | |
522 | 521 | | |
523 | | - | |
| 522 | + | |
| 523 | + | |
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
535 | | - | |
| 535 | + | |
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
| |||
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
569 | | - | |
| 569 | + | |
| 570 | + | |
570 | 571 | | |
571 | | - | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
572 | 577 | | |
573 | 578 | | |
574 | 579 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1687 | 1687 | | |
1688 | 1688 | | |
1689 | 1689 | | |
1690 | | - | |
| 1690 | + | |
| 1691 | + | |
1691 | 1692 | | |
1692 | 1693 | | |
1693 | 1694 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
646 | 646 | | |
647 | 647 | | |
648 | 648 | | |
649 | | - | |
650 | | - | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
651 | 652 | | |
652 | 653 | | |
653 | 654 | | |
654 | 655 | | |
655 | 656 | | |
656 | 657 | | |
657 | 658 | | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
658 | 663 | | |
659 | 664 | | |
660 | 665 | | |
661 | 666 | | |
662 | 667 | | |
663 | 668 | | |
| 669 | + | |
| 670 | + | |
664 | 671 | | |
665 | 672 | | |
666 | 673 | | |
| |||
0 commit comments