diff options
Diffstat (limited to 'llvm/lib/Support/Path.cpp')
-rw-r--r-- | llvm/lib/Support/Path.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Support/Path.cpp b/llvm/lib/Support/Path.cpp index 54ea76b0f92..63ea9119fab 100644 --- a/llvm/lib/Support/Path.cpp +++ b/llvm/lib/Support/Path.cpp @@ -761,10 +761,12 @@ std::error_code createUniqueFile(const Twine &Model, } TempFile::TempFile(StringRef Name, int FD) : TmpName(Name), FD(FD) {} -TempFile::TempFile(TempFile &&Other) { +TempFile::TempFile(TempFile &&Other) { *this = std::move(Other); } +TempFile &TempFile::operator=(TempFile &&Other) { TmpName = std::move(Other.TmpName); FD = Other.FD; Other.Done = true; + return *this; } TempFile::~TempFile() { assert(Done); } |