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);
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);
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);