From fbf6daaec64cced33b5b4e944ef4804ad79d76c2 Mon Sep 17 00:00:00 2001 From: Ahmed Charles Date: Wed, 5 Mar 2014 10:27:34 +0000 Subject: [C++11] Add overloads for externally used OwningPtr functions. This will allow external callers of these functions to switch over time rather than forcing a breaking change all a once. These particular functions were determined by building clang/lld/lldb. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202959 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/FileOutputBuffer.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/llvm/Support/FileOutputBuffer.h') diff --git a/include/llvm/Support/FileOutputBuffer.h b/include/llvm/Support/FileOutputBuffer.h index cbc9c467d2..1884a242b3 100644 --- a/include/llvm/Support/FileOutputBuffer.h +++ b/include/llvm/Support/FileOutputBuffer.h @@ -43,6 +43,9 @@ public: static error_code create(StringRef FilePath, size_t Size, OwningPtr &Result, unsigned Flags = 0); + static error_code create(StringRef FilePath, size_t Size, + std::unique_ptr &Result, + unsigned Flags = 0); /// Returns a pointer to the start of the buffer. uint8_t *getBufferStart() { @@ -83,7 +86,7 @@ private: FileOutputBuffer(llvm::sys::fs::mapped_file_region *R, StringRef Path, StringRef TempPath); - OwningPtr Region; + std::unique_ptr Region; SmallString<128> FinalPath; SmallString<128> TempPath; }; -- cgit v1.2.3