paolosev added a comment.

In D71575#1823252 <https://reviews.llvm.org/D71575#1823252>, @jingham wrote:

> BTW, I had to fix this patch (cd9e5c32302cd3b34b796683eedb072c6a1cfdc1 
> <https://reviews.llvm.org/rGcd9e5c32302cd3b34b796683eedb072c6a1cfdc1>) to 
> build on macOS.  uint64_t and size_t are differently spelled (though I think 
> otherwise equivalent.)  One is "long long unsigned int", the other "long 
> unsigned int".  I have no idea why that's true, but std::min refuses to 
> compare a size_t and a unit64_t.  Anyway, I fixed this by casting one of the 
> two sides of the comparison.  But this was causing problems because we have 
> an api (ReadImageData) that takes a uint64_t for the offset and a size_t for 
> the size.  That seems a little weird to me, why are these different types?


I am sorry for this problem, thank you for the fix! Evidently size_t can also 
be 32 bit, like in this case
To be more precise ReadImageData should take an lldb::offset_t as first 
argument (which is indeed an uint64_t) and it should use the same type for the 
size; I'll clean up this in a separate patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71575/new/

https://reviews.llvm.org/D71575



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to