[PATCH] D31110: [FileSystem] Make file_status store link count and add a file_status::getLinkCount() method.

Stephane Sezer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 17:26:46 PDT 2017


sas added inline comments.


================
Comment at: llvm/include/llvm/Support/FileSystem.h:167
   #endif
+  uint32_t LinkCount = 0;
   file_type Type = file_type::status_error;
----------------
It seems like system types are used here when `LLVM_ON_UNIX` is defined, so you should probably define `LinkCount` as `nlink_t fs_st_nlink;` for POSIX and `uint32_t LinkCount;` only for the Windows case (which means you'll also have to have two separate getters down below).

I'll let someone more knowledgeable with this code confirm what the right thing to do is.


https://reviews.llvm.org/D31110





More information about the llvm-commits mailing list