kadircet wrote:

i think limiting this to `RealFileSystem::openFileForRead` LG, but can we make 
sure `IsText` defaults to `false` and we can only set it in `#ifdef __MVS__` 
block to make sure this is really a no-op for other platforms. e.g.:
```cppp
auto OpenFlags = sys::fs::OF_None;
#ifdef __MVS__
....
  OpenFlags |= sys::fs::OF_Text;
....
#endif
   Expected<file_t> FDOrErr = sys::fs::openNativeFileForRead(
      adjustPath(Name, Storage), OpenFlags, &RealName);
```

I'd still prefer doing this inside 
https://github.com/llvm/llvm-project/blob/main/llvm/lib/Support/Unix/Path.inc#L972-L1118
 as we have other utility functions that create file-descriptors and all of 
them end up using these base functions. By having your logic at a layer above 
these, you risk having subtle discrepancies. But I don't know much about zOS or 
why this is needed, so I'll leave management of that risk to you.

https://github.com/llvm/llvm-project/pull/107906
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to