Index: include/llvm/Support/FileSystem.h =================================================================== --- include/llvm/Support/FileSystem.h +++ include/llvm/Support/FileSystem.h @@ -745,7 +745,7 @@ private: /// Platform-specific mapping state. - uint64_t Size; + size_t Size; void *Mapping; std::error_code init(int FD, uint64_t Offset, mapmode Mode); @@ -763,7 +763,7 @@ ~mapped_file_region(); - uint64_t size() const; + size_t size() const; char *data() const; /// Get a const view of the data. Modifying this memory has undefined Index: lib/Support/Unix/Path.inc =================================================================== --- lib/Support/Unix/Path.inc +++ lib/Support/Unix/Path.inc @@ -641,15 +641,9 @@ return std::error_code(); } -mapped_file_region::mapped_file_region(int fd, mapmode mode, uint64_t length, +mapped_file_region::mapped_file_region(int fd, mapmode mode, size_t length, uint64_t offset, std::error_code &ec) : Size(length), Mapping() { - // Make sure that the requested size fits within SIZE_T. - if (length > std::numeric_limits::max()) { - ec = make_error_code(errc::invalid_argument); - return; - } - ec = init(fd, offset, mode); if (ec) Mapping = nullptr;