[PATCH] D116603: [AIX][z/OS][Support] Provide alternate mapped_file_region::dontNeedImpl implementations

David Tenty via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 4 11:02:44 PST 2022


daltenty added inline comments.


================
Comment at: llvm/lib/Support/Unix/Path.inc:875
   assert(Mode == mapped_file_region::readonly);
   if (Mapping)
+#if defined(__MVS__)
----------------
zibi wrote:
> aganea wrote:
> > Shouldn't we protect the contents of this function with `#ifdef HAVE_SYS_MMAN_H`?
> I don't think we can use HAVE_SYS_MMAN_H since this is defined on z/OS since we do have `sys/mman.h` header file. We just don't have `madvise()`.
The version here now should provide the fallback for both the case where we the header isn't available or if we are on z/OS, so I think we're ok.


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

https://reviews.llvm.org/D116603



More information about the llvm-commits mailing list