Skip to content

Commit b505ef5

Browse files
committed
[DX] Hopefully really fix the big endian bots
Slly mistake in my first attempt. Hopefully this will do it.
1 parent adf7ffd commit b505ef5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/MC/DXContainerPSVInfo.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ void PSVRuntimeInfo::write(raw_ostream &OS, uint32_t Version) const {
2626
default:
2727
InfoSize = sizeof(dxbc::PSV::v2::RuntimeInfo);
2828
}
29+
uint32_t InfoSizeSwapped = InfoSize;
2930
if (sys::IsBigEndianHost)
30-
sys::swapByteOrder(InfoSize);
31+
sys::swapByteOrder(InfoSizeSwapped);
3132
// Write the size of the info.
32-
OS.write(reinterpret_cast<const char *>(&InfoSize), sizeof(uint32_t));
33+
OS.write(reinterpret_cast<const char *>(&InfoSizeSwapped), sizeof(uint32_t));
3334
// Write the info itself.
3435
OS.write(reinterpret_cast<const char *>(&BaseData), InfoSize);
3536
}

0 commit comments

Comments
 (0)