[Support] Fix implicit std::string conversions on Win32.

This commit is contained in:
Benjamin Kramer 2020-01-29 00:02:26 +01:00
parent 1d02418b3c
commit 6ec02ae10e
2 changed files with 2 additions and 2 deletions

View File

@ -138,7 +138,7 @@ static HANDLE RedirectIO(Optional<StringRef> Path, int fd,
if (Path->empty())
fname = "NUL";
else
fname = *Path;
fname = std::string(*Path);
SECURITY_ATTRIBUTES sa;
sa.nLength = sizeof(sa);

View File

@ -460,7 +460,7 @@ bool sys::RemoveFileOnSignal(StringRef Filename, std::string* ErrMsg) {
if (FilesToRemove == NULL)
FilesToRemove = new std::vector<std::string>;
FilesToRemove->push_back(Filename);
FilesToRemove->push_back(std::string(Filename));
LeaveCriticalSection(&CriticalSection);
return false;