Commit 7cb88ce
committed
gccrs: Default Rust frontend to stdin when no input file is provided
This fixes an Internal Compiler Error (ICE) where the `crab1` frontend
would segmentation fault if run without any input source files.
gcc/rust/ChangeLog:
* rust-lang.cc (grs_langhook_post_options): Set pfilename
to "-" if no input file is provided and num_in_fnames is 0.
* rust-session-manager.cc (Session::handle_input_files):
Handle num_files == 0 case explicitly by setting filename to "-".
Signed-off-by: shreyas-omkar <shreyashegdeplus06@gmail.com>1 parent d432809 commit 7cb88ce
2 files changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
289 | 293 | | |
290 | 294 | | |
291 | 295 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
446 | 452 | | |
447 | 453 | | |
448 | 454 | | |
| |||
0 commit comments