diff options
Diffstat (limited to 'include/llvm/Support/FileOutputBuffer.h')
-rw-r--r-- | include/llvm/Support/FileOutputBuffer.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/Support/FileOutputBuffer.h b/include/llvm/Support/FileOutputBuffer.h index fd8879c84622..3bcf64a8a08b 100644 --- a/include/llvm/Support/FileOutputBuffer.h +++ b/include/llvm/Support/FileOutputBuffer.h @@ -17,6 +17,7 @@ #include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/DataTypes.h" +#include "llvm/Support/ErrorOr.h" #include "llvm/Support/FileSystem.h" namespace llvm { @@ -37,9 +38,8 @@ public: /// Factory method to create an OutputBuffer object which manages a read/write /// buffer of the specified size. When committed, the buffer will be written /// to the file at the specified path. - static std::error_code create(StringRef FilePath, size_t Size, - std::unique_ptr<FileOutputBuffer> &Result, - unsigned Flags = 0); + static ErrorOr<std::unique_ptr<FileOutputBuffer>> + create(StringRef FilePath, size_t Size, unsigned Flags = 0); /// Returns a pointer to the start of the buffer. uint8_t *getBufferStart() { |