[clang] [llvm] [SystemZ][z/OS] Refactor AutoConvert.h to remove large MVS guard (PR #143174)

Sean Perry via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 9 09:28:50 PDT 2025


================
@@ -516,7 +514,7 @@ getOpenFileImpl(sys::fs::file_t FD, const Twine &Filename, uint64_t FileSize,
   // off the stream.
   // Note: This only works with the assumption of reading a full file (i.e,
   // Offset == 0 and MapSize == FileSize). Reading a file slice does not work.
-  if (Offset == 0 && MapSize == FileSize && *NeedConversion)
+  if (*NeedConversion && Offset == 0 && MapSize == FileSize)
----------------
perry-ca wrote:

This is for the original code ... what happens if you need conversion but you're not reading a full file?  If that should never happen we should have an assert.

https://github.com/llvm/llvm-project/pull/143174


More information about the llvm-commits mailing list