[PATCH] D51918: [Support] sys::fs::directory_entry includes the file_type.
Jordan Rose via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 17 15:52:03 PDT 2019
jordan_rose added inline comments.
Herald added a project: LLVM.
================
Comment at: llvm/trunk/lib/Support/Unix/Path.inc:704
+ // The DTTOIF macro lets us reuse our status -> type conversion.
+#if defined(_DIRENT_HAVE_D_TYPE) && defined(DTTOIF)
+ return typeForMode(DTTOIF(Entry->d_type));
----------------
Picking this up a year later by noticing that `_DIRENT_HAVE_D_TYPE` isn't actually defined in macOS's headers, which means it probably isn't in BSD either. Do you think just testing for `DTTOIF` would be sufficient?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D51918/new/
https://reviews.llvm.org/D51918
More information about the llvm-commits
mailing list