X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FSupport%2FFileOutputBuffer.cpp;h=94bcdc58a8062d2c2a9179a3a6811044b40fa3bf;hb=165897841bdb651c9d10f4b078f5804b2ca8c30c;hp=8a7b0d73f94367ece8350375896a97d5608cf8e3;hpb=4e2b922131ae617cb8738d1871e9d918c44bdb69;p=oota-llvm.git diff --git a/lib/Support/FileOutputBuffer.cpp b/lib/Support/FileOutputBuffer.cpp index 8a7b0d73f94..94bcdc58a80 100644 --- a/lib/Support/FileOutputBuffer.cpp +++ b/lib/Support/FileOutputBuffer.cpp @@ -11,6 +11,7 @@ // //===----------------------------------------------------------------------===// +#include "llvm/Support/Errc.h" #include "llvm/Support/FileOutputBuffer.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Support/raw_ostream.h" @@ -51,7 +52,7 @@ FileOutputBuffer::create(StringRef FilePath, size_t Size, if (EC) return EC; else - return std::make_error_code(std::errc::operation_not_permitted); + return make_error_code(errc::operation_not_permitted); } // Delete target file. @@ -86,7 +87,7 @@ FileOutputBuffer::create(StringRef FilePath, size_t Size, std::error_code FileOutputBuffer::commit(int64_t NewSmallerSize) { // Unmap buffer, letting OS flush dirty pages to file on disk. - Region.reset(nullptr); + Region.reset(); // If requested, resize file as part of commit. if ( NewSmallerSize != -1 ) {