[clang] [llvm] [SystemZ][z/OS] Add new openFileForReadBinary function, and pass IsText parameter to getBufferForFile (PR #111723)

Abhina Sree via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 9 11:14:31 PDT 2024


================
@@ -117,8 +117,12 @@ FileSystem::~FileSystem() = default;
 
 ErrorOr<std::unique_ptr<MemoryBuffer>>
 FileSystem::getBufferForFile(const llvm::Twine &Name, int64_t FileSize,
-                             bool RequiresNullTerminator, bool IsVolatile) {
-  auto F = openFileForRead(Name);
+                             bool RequiresNullTerminator, bool IsVolatile,
+                             bool IsText) {
+  auto openFileFunctionPointer = &FileSystem::openFileForRead;
+  if (!IsText)
+    openFileFunctionPointer = &FileSystem::openFileForReadBinary;
----------------
abhina-sree wrote:

Thanks this is done

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


More information about the cfe-commits mailing list