================ @@ -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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits