Up to you, but if you split it then i would prefer the semantic change happens immediately after.  It’s useful enough that I don’t want it to shelved and subsequently forgotten about <br><div class="gmail_quote"><div dir="ltr">On Wed, Oct 25, 2017 at 11:28 AM Bob Haarman via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">inglorion added a comment.<br>
<br>
@zturner do you want me to make the semantic changes in the same commit or can we ship the size check removal first and then change the functionality? The latter would be my preference.<br>
<br>
<br>
<br>
================<br>
Comment at: llvm/lib/Support/Windows/Path.inc:726<br>
-  if (Size > std::numeric_limits<SIZE_T>::max())<br>
-    return make_error_code(errc::invalid_argument);<br>
-<br>
----------------<br>
rnk wrote:<br>
> amccarth wrote:<br>
> > I assume someone was originally worried that `SIZE_T` would be 32 bits wide in a 32-bit build but somehow believed `std::size_t` (which is the type of Size) could still somehow be larger than that.  Ain't gonna happen.<br>
> I wonder if we should turn these examples of dynamic range checks into static_asserts. We saw a lot of these tautological comparison warnings in Chrome, where it was much less obvious that the types are the same size. Would this be an appropriate replacement for the check?<br>
>   static_assert(std::numeric_limits<decltype(Size)>::max() <=<br>
>                 std::numeric_limits<SIZE_T>::max());<br>
My original plan was to come up with a way to elide the check if we can statically verify that it will fit, but then zturner pointed out that this is always true and we can just delete the check altogether.<br>
<br>
Note that the code checks if Size fits in a SIZE_T. Size was a uint64_t until recently and is now a size_t, which is at most a 64-bit unsigned. Offset is already an uint64_t. So we need a 64-bit value even if Size were 32-bit on some system. And we do have 64 bits, because we're passing two 32-bit values to CreateFileMappingW and MapViewOfFile. So a 64-bit value will always fit.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D39263" rel="noreferrer" target="_blank">https://reviews.llvm.org/D39263</a><br>
<br>
<br>
<br>
</blockquote></div>