zturner added inline comments.

================
Comment at: lldb/source/Utility/Scalar.cpp:168
+      swapped_words[6] = apint_words[1];
+      swapped_words[7] = apint_words[0];
+      apint_words = swapped_words;
----------------
davide wrote:
> davide wrote:
> > aprantl wrote:
> > > std::reverse perhaps?
> > We might want to change this everywhere.
> I updated the comment but I can't really easily use `std::swap` or 
> `std::reverse` because they operate on vectors and the unit of currency here 
> is an array.
> I thought about initializing a vector from the array we read and then call 
> `std::reverse` (and then covert back to a pointer), but that didn't seem 
> better than what we have now (or, at least, less ugly).
I'm confused why `std::swap(swapped_words[7], swapped_words[0]);` and similar 
for the other 4 doesn't work though.


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

https://reviews.llvm.org/D57213



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

Reply via email to