[DX] Hopefully really fix the big endian bots
authorChris Bieneman <chris.bieneman@me.com>
Thu, 2 Feb 2023 14:13:26 +0000 (08:13 -0600)
committerChris Bieneman <chris.bieneman@me.com>
Thu, 2 Feb 2023 14:13:39 +0000 (08:13 -0600)
Slly mistake in my first attempt. Hopefully this will do it.

llvm/lib/MC/DXContainerPSVInfo.cpp

index 399f54c..48a987e 100644 (file)
@@ -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<const char *>(&InfoSize), sizeof(uint32_t));
+  OS.write(reinterpret_cast<const char *>(&InfoSizeSwapped), sizeof(uint32_t));
   // Write the info itself.
   OS.write(reinterpret_cast<const char *>(&BaseData), InfoSize);
 }