From: Chris Bieneman Date: Thu, 2 Feb 2023 14:13:26 +0000 (-0600) Subject: [DX] Hopefully really fix the big endian bots X-Git-Tag: upstream/17.0.6~18813 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b505ef5e3eb9f9ba2ff8245eb37af9a7ea180072;p=platform%2Fupstream%2Fllvm.git [DX] Hopefully really fix the big endian bots Slly mistake in my first attempt. Hopefully this will do it. --- diff --git a/llvm/lib/MC/DXContainerPSVInfo.cpp b/llvm/lib/MC/DXContainerPSVInfo.cpp index 399f54c..48a987e 100644 --- a/llvm/lib/MC/DXContainerPSVInfo.cpp +++ b/llvm/lib/MC/DXContainerPSVInfo.cpp @@ -26,10 +26,11 @@ void PSVRuntimeInfo::write(raw_ostream &OS, uint32_t Version) const { default: InfoSize = sizeof(dxbc::PSV::v2::RuntimeInfo); } + uint32_t InfoSizeSwapped = InfoSize; if (sys::IsBigEndianHost) - sys::swapByteOrder(InfoSize); + sys::swapByteOrder(InfoSizeSwapped); // Write the size of the info. - OS.write(reinterpret_cast(&InfoSize), sizeof(uint32_t)); + OS.write(reinterpret_cast(&InfoSizeSwapped), sizeof(uint32_t)); // Write the info itself. OS.write(reinterpret_cast(&BaseData), InfoSize); }