diff --git a/clang/lib/ARCMigrate/FileRemapper.cpp b/clang/lib/ARCMigrate/FileRemapper.cpp --- a/clang/lib/ARCMigrate/FileRemapper.cpp +++ b/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);