summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Windows/Path.inc
diff options
context:
space:
mode:
authorBob Haarman <llvm@inglorion.net>2017-10-27 23:41:17 +0000
committerBob Haarman <llvm@inglorion.net>2017-10-27 23:41:17 +0000
commitd4e75f84e51d27ec1a1d11a4ca0bc38640d235fa (patch)
treec877c55d5ea0afc8259972df9c88e1a0a1f7522e /llvm/lib/Support/Windows/Path.inc
parentf22728e6369b75061cecde953d38162f7eeba53e (diff)
downloadbcm5719-llvm-d4e75f84e51d27ec1a1d11a4ca0bc38640d235fa.tar.gz
bcm5719-llvm-d4e75f84e51d27ec1a1d11a4ca0bc38640d235fa.zip
[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 llvm-svn: 316814
Diffstat (limited to 'llvm/lib/Support/Windows/Path.inc')
-rw-r--r--llvm/lib/Support/Windows/Path.inc4
1 files changed, 0 insertions, 4 deletions
diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc
index 31462633ee8..fede6027f9f 100644
--- a/llvm/lib/Support/Windows/Path.inc
+++ b/llvm/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<SIZE_T>::max())
- return make_error_code(errc::invalid_argument);
-
HANDLE FileHandle = reinterpret_cast<HANDLE>(_get_osfhandle(FD));
if (FileHandle == INVALID_HANDLE_VALUE)
return make_error_code(errc::bad_file_descriptor);
OpenPOWER on IntegriCloud