This patch adds a check that verifies that the input file used when
calling the frontend driver (i.e. flang-new -fc1) actually exists.
This was not required for the compiler driver, flang-new, as that's
already handled in libclangDriver.
Once all input/output file management is moved to the driver, we should
also check that for input from stdin the corresponding file descriptor
was successfully acquired.
This patch also makes sure that the default action in the frontend is
ParseSyntaxOnly. This is consistent with Clang. Before this change
flang-new -fc1 would do nothing, which makes testing changes like the
one introduced here a bit tricky.
The input may be a regular file but still not readable, e.g. because of permissions. Should that be caught here too for consistency?
Why is this checking needed at all? The front end will report an error if it can't read the file.