Skip to content

Commit 92a470e

Browse files
committed
[Scalar] Hoist a duplicated (and sometimes wrong) comment.
Pointed out by Zachary and Adrian. llvm-svn: 352641
1 parent fc832e9 commit 92a470e

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

lldb/source/Utility/Scalar.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ const void *Scalar::GetBytes() const {
125125
bytes += 8 - byte_size;
126126
}
127127
return bytes;
128+
// getRawData always returns a pointer to an array of uint64_t values,
129+
// where the least-significant word always comes first. On big-endian
130+
// systems we need to swap the words.
128131
case e_sint128:
129132
case e_uint128:
130133
apint_words = m_integer.getRawData();
131-
// getRawData always returns a pointer to an array of two uint64_t values,
132-
// where the least-significant word always comes first. On big-endian
133-
// systems we need to swap the two words.
134134
if (endian::InlHostByteOrder() == eByteOrderBig) {
135135
swapped_words[0] = apint_words[1];
136136
swapped_words[1] = apint_words[0];
@@ -140,9 +140,6 @@ const void *Scalar::GetBytes() const {
140140
case e_sint256:
141141
case e_uint256:
142142
apint_words = m_integer.getRawData();
143-
// getRawData always returns a pointer to an array of four uint64_t values,
144-
// where the least-significant word always comes first. On big-endian
145-
// systems we need to swap the four words.
146143
if (endian::InlHostByteOrder() == eByteOrderBig) {
147144
swapped_words[0] = apint_words[3];
148145
swapped_words[1] = apint_words[2];
@@ -154,9 +151,6 @@ const void *Scalar::GetBytes() const {
154151
case e_sint512:
155152
case e_uint512:
156153
apint_words = m_integer.getRawData();
157-
// getRawData always returns a pointer to an array of four uint64_t values,
158-
// where the least-significant word always comes first. On big-endian
159-
// systems we need to swap the four words.
160154
if (endian::InlHostByteOrder() == eByteOrderBig) {
161155
swapped_words[0] = apint_words[7];
162156
swapped_words[1] = apint_words[6];

0 commit comments

Comments
 (0)