[clang] [clang-tools-extra] [lldb] [llvm] [SystemZ][z/OS] Propagate IsText parameter to open text files as text (PR #107906)
kadir çetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 20 05:05:04 PDT 2024
================
@@ -323,10 +325,11 @@ ErrorOr<Status> RealFileSystem::status(const Twine &Path) {
}
ErrorOr<std::unique_ptr<File>>
-RealFileSystem::openFileForRead(const Twine &Name) {
+RealFileSystem::openFileForRead(const Twine &Name, bool IsText) {
SmallString<256> RealName, Storage;
Expected<file_t> FDOrErr = sys::fs::openNativeFileForRead(
- adjustPath(Name, Storage), sys::fs::OF_None, &RealName);
+ adjustPath(Name, Storage), IsText ? sys::fs::OF_Text : sys::fs::OF_None,
----------------
kadircet wrote:
this seems like the only place that uses `IsText`. is there any reason why you can't deduce that signal from `Name` here directly? rather than propagating it all the way from the caller?
https://github.com/llvm/llvm-project/pull/107906
More information about the cfe-commits
mailing list