[PATCH] D100056: [SystemZ][z/OS] Set files in FileRemapper.cpp are text
Abhina Sree via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 16 11:54:06 PDT 2021
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<std::pair<const FileEntry *, const FileEntry *> > pairs;
llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> 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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100056.338192.patch
Type: text/x-patch
Size: 1450 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210416/8a6a2cac/attachment.bin>
More information about the cfe-commits
mailing list