[llvm] [SystemZ][z/OS] Preserve filetag when rewriting files (PR #181733)

Abhina Sree via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 18 11:13:26 PST 2026


================
@@ -1025,6 +1025,14 @@ Error llvm::writeToOutput(StringRef OutputFileName,
 
   raw_fd_ostream Out(Temp->FD, false);
 
+#if defined(__MVS__)
+  if (auto EC = llvm::copyFileTagAttributes(OutputFileName.str(), Temp->FD)) {
+    if (EC != std::errc::no_such_file_or_directory)
+      llvm::errs() << "Failed to preserve file tag attributes for "
+                   << OutputFileName << "\n";
----------------
abhina-sree wrote:

I've now modified it to use this function instead which is also used above createFileError

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


More information about the llvm-commits mailing list