Author: compnerd Date: Mon Feb 6 20:46:59 2017 New Revision: 294270 URL: http://llvm.org/viewvc/llvm-project?rev=294270&view=rev Log: filesystem: return the constructed object
This really should get identified properly by the compiler to convert to a NVRO, but compress the code anyways. This makes the implementation identical to directory_iterator.cpp Modified: libcxx/trunk/src/experimental/filesystem/operations.cpp Modified: libcxx/trunk/src/experimental/filesystem/operations.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/experimental/filesystem/operations.cpp?rev=294270&r1=294269&r2=294270&view=diff ============================================================================== --- libcxx/trunk/src/experimental/filesystem/operations.cpp (original) +++ libcxx/trunk/src/experimental/filesystem/operations.cpp Mon Feb 6 20:46:59 2017 @@ -35,12 +35,9 @@ namespace detail { namespace { using value_type = path::value_type; using string_type = path::string_type; - - inline std::error_code capture_errno() { - _LIBCPP_ASSERT(errno, "Expected errno to be non-zero"); - std::error_code m_ec(errno, std::generic_category()); - return m_ec; + _LIBCPP_ASSERT(errno, "Expected errno to be non-zero"); + return std::error_code(errno, std::generic_category()); } void set_or_throw(std::error_code const& m_ec, std::error_code* ec, _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits