[PATCH] D151567: [LLVM][Support] Report EISDIR when opening a directory on AIX

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 22 10:33:48 PDT 2023


hubert.reinterpretcast added inline comments.


================
Comment at: llvm/lib/Support/CommandLine.cpp:1312
+                               Twine("cannot not open file '") + FName +
+                                   "': Is a directory");
+    }
----------------
azhan92 wrote:
> hubert.reinterpretcast wrote:
> > @azhan92, how was the string (`"': Is a directory"`) determined in terms of the text and capitalization? I ask because `strerror` on different platforms may return different text (for example, may include message catalogue numbers or use different capitalization).
> I used that string because that's the message used on Linux, and also what this lit test expects (https://github.com/llvm/llvm-project/blob/main/clang/test/Driver/response-file-errs.c). 
@azhan92, for consistency, please use the `message()` from the `error_code`.
For example, z/OS generates: `EDC5123I Is a directory.`



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151567/new/

https://reviews.llvm.org/D151567



More information about the llvm-commits mailing list