[PATCH] D95127: [flang][driver] Disallow non-existent input files in the frontend driver
Andrzej Warzynski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 25 08:13:27 PST 2021
awarzynski added inline comments.
================
Comment at: flang/lib/Frontend/FrontendAction.cpp:37
+
+ // Return immediately if the input file does not exist or is not a file. Note
+ // that we cannot check this for input from stdin.
----------------
tskeith wrote:
> 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.
> The input may be a regular file but still not readable, e.g. because of permissions. Should that be caught here too for consistency?
Initially I wanted to keep this simple and catch the most obvious things.
> Why is this checking needed at all? The front end will report an error if it can't read the file.
The long term goal is for the driver makes sure that the frontend is not entered before all input is validated. This includes managing input files. This is a small step in that direction.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95127/new/
https://reviews.llvm.org/D95127
More information about the llvm-commits
mailing list