summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-03-07 17:48:47 +0000
committerZachary Turner <zturner@google.com>2017-03-07 17:48:47 +0000
commit3b9fb88476b9d11a31c0dcc2ede9b1156e994096 (patch)
tree7da56dcea081fab7a7b0a13c47161751cbc3b346
parent6d306061686954e7f831309caba7b6b1f6c61e25 (diff)
downloadbcm5719-llvm-3b9fb88476b9d11a31c0dcc2ede9b1156e994096.tar.gz
bcm5719-llvm-3b9fb88476b9d11a31c0dcc2ede9b1156e994096.zip
[fs] Make sure to check S_ISLNK() in fillStatus.
llvm-svn: 297167
-rw-r--r--llvm/lib/Support/Unix/Path.inc2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc
index 05636f8bcf3..76e1ed2d418 100644
--- a/llvm/lib/Support/Unix/Path.inc
+++ b/llvm/lib/Support/Unix/Path.inc
@@ -500,6 +500,8 @@ static std::error_code fillStatus(int StatRet, const struct stat &Status,
Type = file_type::fifo_file;
else if (S_ISSOCK(Status.st_mode))
Type = file_type::socket_file;
+ else if (S_ISLNK(Status.st_mode))
+ Type = file_type::symlink_file;
perms Perms = static_cast<perms>(Status.st_mode);
Result =
OpenPOWER on IntegriCloud