[PATCH] D100056: [SystemZ][z/OS] Set files in FileRemapper.cpp are text
This revision was automatically updated to reflect the committed changes. Closed by commit rGfbc325934661: [SystemZ][z/OS] Set files in FileRemapper.cpp are text (authored by abhina.sreeskantharajan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100056/new/ https://reviews.llvm.org/D100056 Files: clang/lib/ARCMigrate/FileRemapper.cpp Index: clang/lib/ARCMigrate/FileRemapper.cpp === --- clang/lib/ARCMigrate/FileRemapper.cpp +++ clang/lib/ARCMigrate/FileRemapper.cpp @@ -63,7 +63,7 @@ std::vector > pairs; llvm::ErrorOr> fileBuf = - llvm::MemoryBuffer::getFile(infoFile); + llvm::MemoryBuffer::getFile(infoFile, /*IsText=*/true); if (!fileBuf) return report("Error opening file: " + infoFile, Diag); @@ -121,7 +121,7 @@ std::error_code EC; std::string infoFile = std::string(outputPath); - llvm::raw_fd_ostream infoOut(infoFile, EC, llvm::sys::fs::OF_None); + llvm::raw_fd_ostream infoOut(infoFile, EC, llvm::sys::fs::OF_Text); if (EC) return report(EC.message(), Diag); @@ -142,9 +142,10 @@ SmallString<64> tempPath; int fd; - if (fs::createTemporaryFile(path::filename(origFE->getName()), - path::extension(origFE->getName()).drop_front(), fd, - tempPath)) + if (fs::createTemporaryFile( + path::filename(origFE->getName()), + path::extension(origFE->getName()).drop_front(), fd, tempPath, + llvm::sys::fs::OF_Text)) return report("Could not create file: " + tempPath.str(), Diag); llvm::raw_fd_ostream newOut(fd, /*shouldClose=*/true); Index: clang/lib/ARCMigrate/FileRemapper.cpp === --- clang/lib/ARCMigrate/FileRemapper.cpp +++ clang/lib/ARCMigrate/FileRemapper.cpp @@ -63,7 +63,7 @@ std::vector > pairs; llvm::ErrorOr> fileBuf = - llvm::MemoryBuffer::getFile(infoFile); + llvm::MemoryBuffer::getFile(infoFile, /*IsText=*/true); if (!fileBuf) return report("Error opening file: " + infoFile, Diag); @@ -121,7 +121,7 @@ std::error_code EC; std::string infoFile = std::string(outputPath); - llvm::raw_fd_ostream infoOut(infoFile, EC, llvm::sys::fs::OF_None); + llvm::raw_fd_ostream infoOut(infoFile, EC, llvm::sys::fs::OF_Text); if (EC) return report(EC.message(), Diag); @@ -142,9 +142,10 @@ SmallString<64> tempPath; int fd; - if (fs::createTemporaryFile(path::filename(origFE->getName()), - path::extension(origFE->getName()).drop_front(), fd, - tempPath)) + if (fs::createTemporaryFile( + path::filename(origFE->getName()), + path::extension(origFE->getName()).drop_front(), fd, tempPath, + llvm::sys::fs::OF_Text)) return report("Could not create file: " + tempPath.str(), Diag); llvm::raw_fd_ostream newOut(fd, /*shouldClose=*/true); ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D100056: [SystemZ][z/OS] Set files in FileRemapper.cpp are text
Jonathan.Crowther accepted this revision. Jonathan.Crowther added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100056/new/ https://reviews.llvm.org/D100056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D100056: [SystemZ][z/OS] Set files in FileRemapper.cpp are text
abhina.sreeskantharajan updated this revision to Diff 338192. abhina.sreeskantharajan added a comment. fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100056/new/ https://reviews.llvm.org/D100056 Files: clang/lib/ARCMigrate/FileRemapper.cpp Index: clang/lib/ARCMigrate/FileRemapper.cpp === --- clang/lib/ARCMigrate/FileRemapper.cpp +++ clang/lib/ARCMigrate/FileRemapper.cpp @@ -63,7 +63,7 @@ std::vector > pairs; llvm::ErrorOr> fileBuf = - llvm::MemoryBuffer::getFile(infoFile); + llvm::MemoryBuffer::getFile(infoFile, /*IsText=*/true); if (!fileBuf) return report("Error opening file: " + infoFile, Diag); @@ -121,7 +121,7 @@ std::error_code EC; std::string infoFile = std::string(outputPath); - llvm::raw_fd_ostream infoOut(infoFile, EC, llvm::sys::fs::OF_None); + llvm::raw_fd_ostream infoOut(infoFile, EC, llvm::sys::fs::OF_Text); if (EC) return report(EC.message(), Diag); @@ -142,9 +142,10 @@ SmallString<64> tempPath; int fd; - if (fs::createTemporaryFile(path::filename(origFE->getName()), - path::extension(origFE->getName()).drop_front(), fd, - tempPath)) + if (fs::createTemporaryFile( + path::filename(origFE->getName()), + path::extension(origFE->getName()).drop_front(), fd, tempPath, + llvm::sys::fs::OF_Text)) return report("Could not create file: " + tempPath.str(), Diag); llvm::raw_fd_ostream newOut(fd, /*shouldClose=*/true); Index: clang/lib/ARCMigrate/FileRemapper.cpp === --- clang/lib/ARCMigrate/FileRemapper.cpp +++ clang/lib/ARCMigrate/FileRemapper.cpp @@ -63,7 +63,7 @@ std::vector > pairs; llvm::ErrorOr> fileBuf = - llvm::MemoryBuffer::getFile(infoFile); + llvm::MemoryBuffer::getFile(infoFile, /*IsText=*/true); if (!fileBuf) return report("Error opening file: " + infoFile, Diag); @@ -121,7 +121,7 @@ std::error_code EC; std::string infoFile = std::string(outputPath); - llvm::raw_fd_ostream infoOut(infoFile, EC, llvm::sys::fs::OF_None); + llvm::raw_fd_ostream infoOut(infoFile, EC, llvm::sys::fs::OF_Text); if (EC) return report(EC.message(), Diag); @@ -142,9 +142,10 @@ SmallString<64> tempPath; int fd; - if (fs::createTemporaryFile(path::filename(origFE->getName()), - path::extension(origFE->getName()).drop_front(), fd, - tempPath)) + if (fs::createTemporaryFile( + path::filename(origFE->getName()), + path::extension(origFE->getName()).drop_front(), fd, tempPath, + llvm::sys::fs::OF_Text)) return report("Could not create file: " + tempPath.str(), Diag); llvm::raw_fd_ostream newOut(fd, /*shouldClose=*/true); ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D100056: [SystemZ][z/OS] Set files in FileRemapper.cpp are text
abhina.sreeskantharajan created this revision. abhina.sreeskantharajan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch sets files in FileRemapper to open as text. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D100056 Files: clang/lib/ARCMigrate/FileRemapper.cpp Index: clang/lib/ARCMigrate/FileRemapper.cpp === --- clang/lib/ARCMigrate/FileRemapper.cpp +++ clang/lib/ARCMigrate/FileRemapper.cpp @@ -63,7 +63,7 @@ std::vector > pairs; llvm::ErrorOr> fileBuf = - llvm::MemoryBuffer::getFile(infoFile); + llvm::MemoryBuffer::getFile(infoFile, /*IsText=*/true); if (!fileBuf) return report("Error opening file: " + infoFile, Diag); @@ -121,7 +121,7 @@ std::error_code EC; std::string infoFile = std::string(outputPath); - llvm::raw_fd_ostream infoOut(infoFile, EC, llvm::sys::fs::OF_None); + llvm::raw_fd_ostream infoOut(infoFile, EC, llvm::sys::fs::OF_Text); if (EC) return report(EC.message(), Diag); @@ -144,7 +144,7 @@ int fd; if (fs::createTemporaryFile(path::filename(origFE->getName()), path::extension(origFE->getName()).drop_front(), fd, - tempPath)) + tempPath, llvm::sys::fs::OF_Text)) return report("Could not create file: " + tempPath.str(), Diag); llvm::raw_fd_ostream newOut(fd, /*shouldClose=*/true); Index: clang/lib/ARCMigrate/FileRemapper.cpp === --- clang/lib/ARCMigrate/FileRemapper.cpp +++ clang/lib/ARCMigrate/FileRemapper.cpp @@ -63,7 +63,7 @@ std::vector > pairs; llvm::ErrorOr> fileBuf = - llvm::MemoryBuffer::getFile(infoFile); + llvm::MemoryBuffer::getFile(infoFile, /*IsText=*/true); if (!fileBuf) return report("Error opening file: " + infoFile, Diag); @@ -121,7 +121,7 @@ std::error_code EC; std::string infoFile = std::string(outputPath); - llvm::raw_fd_ostream infoOut(infoFile, EC, llvm::sys::fs::OF_None); + llvm::raw_fd_ostream infoOut(infoFile, EC, llvm::sys::fs::OF_Text); if (EC) return report(EC.message(), Diag); @@ -144,7 +144,7 @@ int fd; if (fs::createTemporaryFile(path::filename(origFE->getName()), path::extension(origFE->getName()).drop_front(), fd, - tempPath)) + tempPath, llvm::sys::fs::OF_Text)) return report("Could not create file: " + tempPath.str(), Diag); llvm::raw_fd_ostream newOut(fd, /*shouldClose=*/true); ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits