aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/FileOutputBuffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support/FileOutputBuffer.cpp')
-rw-r--r--lib/Support/FileOutputBuffer.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/Support/FileOutputBuffer.cpp b/lib/Support/FileOutputBuffer.cpp
index 8f2c9fc..49311c2 100644
--- a/lib/Support/FileOutputBuffer.cpp
+++ b/lib/Support/FileOutputBuffer.cpp
@@ -12,7 +12,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/Support/FileOutputBuffer.h"
-#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/system_error.h"
@@ -85,19 +84,9 @@ error_code FileOutputBuffer::create(StringRef FilePath,
return error_code::success();
}
-error_code FileOutputBuffer::create(StringRef FilePath,
- size_t Size,
- OwningPtr<FileOutputBuffer> &Result,
- unsigned Flags) {
- std::unique_ptr<FileOutputBuffer> FOB;
- error_code ec = create(FilePath, Size, FOB, Flags);
- Result = std::move(FOB);
- return ec;
-}
-
error_code FileOutputBuffer::commit(int64_t NewSmallerSize) {
// Unmap buffer, letting OS flush dirty pages to file on disk.
- Region.reset(0);
+ Region.reset(nullptr);
// If requested, resize file as part of commit.
if ( NewSmallerSize != -1 ) {