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

kadir çetinkaya via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 10 07:31:37 PDT 2024


================
@@ -54,7 +54,9 @@ std::unique_ptr<HeaderMap> HeaderMap::Create(FileEntryRef FE, FileManager &FM) {
   unsigned FileSize = FE.getSize();
   if (FileSize <= sizeof(HMapHeader)) return nullptr;
 
-  auto FileBuffer = FM.getBufferForFile(FE);
+  auto FileBuffer =
+      FM.getBufferForFile(FE, /*IsVolatile=*/false,
+                          /*RequiresNullTerminator=*/true, /*IsText=*/false);
----------------
kadircet wrote:

i think it'd be great to have a test case for this that actually fails (even if only in zOS).

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


More information about the llvm-commits mailing list