diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
commit | cfca06d7963fa0909f90483b42a6d7d194d01e08 (patch) | |
tree | 209fb2a2d68f8f277793fc8df46c753d31bc853b /clang/lib/ARCMigrate/FileRemapper.cpp | |
parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) |
Notes
Diffstat (limited to 'clang/lib/ARCMigrate/FileRemapper.cpp')
-rw-r--r-- | clang/lib/ARCMigrate/FileRemapper.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/ARCMigrate/FileRemapper.cpp b/clang/lib/ARCMigrate/FileRemapper.cpp index a031fe22ac13..0222583c015b 100644 --- a/clang/lib/ARCMigrate/FileRemapper.cpp +++ b/clang/lib/ARCMigrate/FileRemapper.cpp @@ -43,7 +43,7 @@ std::string FileRemapper::getRemapInfoFile(StringRef outputDir) { assert(!outputDir.empty()); SmallString<128> InfoFile = outputDir; llvm::sys::path::append(InfoFile, "remap"); - return InfoFile.str(); + return std::string(InfoFile.str()); } bool FileRemapper::initFromDisk(StringRef outputDir, DiagnosticsEngine &Diag, @@ -56,7 +56,7 @@ bool FileRemapper::initFromFile(StringRef filePath, DiagnosticsEngine &Diag, bool ignoreIfFilesChanged) { assert(FromToMappings.empty() && "initFromDisk should be called before any remap calls"); - std::string infoFile = filePath; + std::string infoFile = std::string(filePath); if (!llvm::sys::fs::exists(infoFile)) return false; @@ -120,7 +120,7 @@ bool FileRemapper::flushToFile(StringRef outputPath, DiagnosticsEngine &Diag) { using namespace llvm::sys; std::error_code EC; - std::string infoFile = outputPath; + std::string infoFile = std::string(outputPath); llvm::raw_fd_ostream infoOut(infoFile, EC, llvm::sys::fs::OF_None); if (EC) return report(EC.message(), Diag); |