Commit 076a227
committed
gcc: 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/ChangeLog:
* rust/rust-lang.cc (grs_langhook_post_options): Set pfilename
to "-" if no input file is provided and num_in_fnames is 0.
* rust/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 ab68ca3 commit 076a227
2 files changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
| |||
286 | 289 | | |
287 | 290 | | |
288 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
289 | 296 | | |
290 | 297 | | |
291 | 298 | | |
| |||
| 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