From: Bob Haarman Date: Fri, 27 Oct 2017 23:41:17 +0000 (+0000) Subject: [support] remove tautological comparison in Support/Windows/Path.inc X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f84f672eaf4c6ea243d0d6ebc0da020bf0838d5b;p=llvm [support] remove tautological comparison in Support/Windows/Path.inc Summary: The removed code checks that we are able to handle a 64-bit number, but the code we're calling takes two dwords (for a total of 64 bits), so this is always true. Reviewers: zturner, rnk, majnemer, compnerd Reviewed By: zturner Subscribers: amccarth, hiraditya, lebedev.ri, llvm-commits Differential Revision: https://reviews.llvm.org/D39263 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316814 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Support/Windows/Path.inc b/lib/Support/Windows/Path.inc index 31462633ee8..fede6027f9f 100644 --- a/lib/Support/Windows/Path.inc +++ b/lib/Support/Windows/Path.inc @@ -721,10 +721,6 @@ std::error_code setLastModificationAndAccessTime(int FD, TimePoint<> Time) { std::error_code mapped_file_region::init(int FD, uint64_t Offset, mapmode Mode) { - // Make sure that the requested size fits within SIZE_T. - if (Size > std::numeric_limits::max()) - return make_error_code(errc::invalid_argument); - HANDLE FileHandle = reinterpret_cast(_get_osfhandle(FD)); if (FileHandle == INVALID_HANDLE_VALUE) return make_error_code(errc::bad_file_descriptor);