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

Zachary Turner via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 28 10:19:20 PST 2019


zturner 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];
----------------
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]);
```


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

https://reviews.llvm.org/D57213





More information about the lldb-commits mailing list