diff options
| -rw-r--r-- | llvm/tools/dsymutil/MachOUtils.cpp | 2 | ||||
| -rw-r--r-- | llvm/tools/dsymutil/MachOUtils.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/tools/dsymutil/MachOUtils.cpp b/llvm/tools/dsymutil/MachOUtils.cpp index b7ab35274f9..cd0f2805dc2 100644 --- a/llvm/tools/dsymutil/MachOUtils.cpp +++ b/llvm/tools/dsymutil/MachOUtils.cpp @@ -35,7 +35,7 @@ llvm::Error ArchAndFile::createTempFile() { if (!T) return T.takeError(); - File = llvm::Optional<sys::fs::TempFile>(std::move(*T)); + File = llvm::make_unique<sys::fs::TempFile>(std::move(*T)); return Error::success(); } diff --git a/llvm/tools/dsymutil/MachOUtils.h b/llvm/tools/dsymutil/MachOUtils.h index 83b648122b7..bc88f58cf0f 100644 --- a/llvm/tools/dsymutil/MachOUtils.h +++ b/llvm/tools/dsymutil/MachOUtils.h @@ -26,13 +26,14 @@ namespace MachOUtils { struct ArchAndFile { std::string Arch; // Optional because TempFile has no default constructor. - Optional<llvm::sys::fs::TempFile> File; + std::unique_ptr<llvm::sys::fs::TempFile> File; llvm::Error createTempFile(); llvm::StringRef path() const; ArchAndFile(StringRef Arch) : Arch(Arch) {} ArchAndFile(ArchAndFile &&A) = default; + ArchAndFile &operator=(ArchAndFile &&A) = default; ~ArchAndFile(); }; |

