gnu/gcc/073b4656d07e40f83a1db7f4462ab2d68b1875a2 [PATCH v6 2/4] driver: Simplify `find_a_program` and `find_a_file`
Now that `find_a_program` and `find_a_file` have been separated, we can
make a number of simplification in both of them. Most notably, we don't
need a mode parameter, because one is always doing `R_OK`, and the other
is always doing `X_OK`.
This change also proves that some of the code I removed from
`find_a_file` in the previous commit is actually dead.
gcc/ChangeLog:
* gcc.cc (find_a_file): Remove mode parameter, because always
R_OK. Skip suffix logic, because suffix is always empty in that
case.
(read_specs): Remove mode from find_a_file call.
(find_a_program): Suffix is unconditional, inline mode constant.
(end_going_arg): Remove mode from find_a_file call.
(find_file): Remove mode from find_a_file call.
(driver::set_up_specs): Remove mode from find_a_file call.
(include_spec_function): Remove mode from find_a_file call.
Signed-off-by: John Ericson <git@JohnEricson.me>
1 file changed