Commit d533f57
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 <[email protected]>1 parent f942905 commit d533f57
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 | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
402 | 408 | | |
403 | 409 | | |
404 | 410 | | |
| |||
0 commit comments