Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit f84f672

Browse files
committed
[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
1 parent 7412860 commit f84f672

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

lib/Support/Windows/Path.inc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -721,10 +721,6 @@ std::error_code setLastModificationAndAccessTime(int FD, TimePoint<> Time) {
721721

722722
std::error_code mapped_file_region::init(int FD, uint64_t Offset,
723723
mapmode Mode) {
724-
// Make sure that the requested size fits within SIZE_T.
725-
if (Size > std::numeric_limits<SIZE_T>::max())
726-
return make_error_code(errc::invalid_argument);
727-
728724
HANDLE FileHandle = reinterpret_cast<HANDLE>(_get_osfhandle(FD));
729725
if (FileHandle == INVALID_HANDLE_VALUE)
730726
return make_error_code(errc::bad_file_descriptor);

0 commit comments

Comments
 (0)