From 41cdcbeedd761c6b9d349ce868e683cfcfef280f Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Fri, 20 Jul 2018 01:44:33 +0000 Subject: [PATCH] Use _LIBCPP_UNREACHABLE to convince GCC that non-void functions actually always return llvm-svn: 337519 --- libcxx/include/experimental/filesystem | 8 ++++++++ libcxx/src/experimental/filesystem/filesystem_common.h | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libcxx/include/experimental/filesystem b/libcxx/include/experimental/filesystem index be73bf135bc4..6481aa680a23 100644 --- a/libcxx/include/experimental/filesystem +++ b/libcxx/include/experimental/filesystem @@ -232,6 +232,7 @@ #include #include +#include #include #include #include @@ -2250,6 +2251,7 @@ private: __ec->clear(); return __data_.__type_; } + _LIBCPP_UNREACHABLE(); } _LIBCPP_INLINE_VISIBILITY @@ -2270,6 +2272,7 @@ private: return __data_.__type_; } } + _LIBCPP_UNREACHABLE(); } _LIBCPP_INLINE_VISIBILITY @@ -2284,6 +2287,7 @@ private: case _RefreshSymlink: return file_status(__get_ft(__ec), __data_.__non_sym_perms_); } + _LIBCPP_UNREACHABLE(); } _LIBCPP_INLINE_VISIBILITY @@ -2299,6 +2303,7 @@ private: case _RefreshSymlinkUnresolved: return file_status(__get_sym_ft(__ec), __data_.__sym_perms_); } + _LIBCPP_UNREACHABLE(); } @@ -2324,6 +2329,7 @@ private: return __data_.__size_; } } + _LIBCPP_UNREACHABLE(); } _LIBCPP_INLINE_VISIBILITY @@ -2342,6 +2348,7 @@ private: return __data_.__nlink_; } } + _LIBCPP_UNREACHABLE(); } _LIBCPP_INLINE_VISIBILITY @@ -2364,6 +2371,7 @@ private: return __data_.__write_time_; } } + _LIBCPP_UNREACHABLE(); } private: _Path __p_; diff --git a/libcxx/src/experimental/filesystem/filesystem_common.h b/libcxx/src/experimental/filesystem/filesystem_common.h index ab7ecbd013ed..0dd6e9ee4389 100644 --- a/libcxx/src/experimental/filesystem/filesystem_common.h +++ b/libcxx/src/experimental/filesystem/filesystem_common.h @@ -228,8 +228,8 @@ public: } // namespace time_util -using TimeSpec = struct timespec; -using StatT = struct stat; +using TimeSpec = struct ::timespec; +using StatT = struct ::stat; using FSTime = time_util::fs_time_util; -- 2.34.1