Fix build breaks for master-next against llvm.org.

StringRef conversion to std::string needs to be explicit now.
This commit is contained in:
Michael Forster
2020-03-04 14:43:49 +01:00
parent e92599fa63
commit 32d2b1486c
5 changed files with 10 additions and 10 deletions

View File

@@ -33,7 +33,7 @@ static bool emitFileWithContents(StringRef path, StringRef contents,
if (llvm::sys::fs::openFileForWrite(path, fd))
return true;
if (pathOut)
*pathOut = path;
*pathOut = path.str();
llvm::raw_fd_ostream file(fd, /*shouldClose=*/true);
file << contents;
return false;