[Lldb-commits] [PATCH] D57213: [Scalar] Add support for 512-bits values.

Davide Italiano via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 28 10:30:38 PST 2019


davide marked an inline comment as done.
davide added inline comments.


================
Comment at: lldb/source/Utility/Scalar.cpp:161
+    if (endian::InlHostByteOrder() == eByteOrderBig) {
+      swapped_words[0] = apint_words[7];
+      swapped_words[1] = apint_words[6];
----------------
zturner wrote:
> I'm confused.  You say it returns a pointer to an array of four `uint64_t` values, but here you're clearly swapping the order of //eight// `uint64_t` values.  Is the comment wrong?
> 
> Anyway, how about:
> 
> ```
> std::swap(apint_words[0], apint_words[7]);
> std::swap(apint_words[1], apint_words[6]);
> std::swap(apint_words[2], apint_words[5]);
> std::swap(apint_words[3], apint_words[4]);
> ```
Yes the comment is wrong. I need to update it.


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

https://reviews.llvm.org/D57213





More information about the lldb-commits mailing list