X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FSupport%2FDataStream.cpp;h=7815d08092e0e0448e9a03045aec354c342464d7;hb=55804a089e7ac26d5a07a9ac38e5dcedad3f2754;hp=0e8a717b51521c23dde0fd64f88994ce5d2ec1c6;hpb=4eebfb8b399b1e0a209c971690e108c18c0e1f10;p=oota-llvm.git diff --git a/lib/Support/DataStream.cpp b/lib/Support/DataStream.cpp index 0e8a717b515..7815d08092e 100644 --- a/lib/Support/DataStream.cpp +++ b/lib/Support/DataStream.cpp @@ -15,13 +15,13 @@ //===----------------------------------------------------------------------===// #define DEBUG_TYPE "Data-stream" -#include "llvm/ADT/Statistic.h" #include "llvm/Support/DataStream.h" +#include "llvm/ADT/Statistic.h" #include "llvm/Support/Program.h" #include "llvm/Support/system_error.h" -#include #include #include +#include #if !defined(_MSC_VER) && !defined(__MINGW32__) #include #else @@ -58,7 +58,7 @@ public: virtual ~DataFileStreamer() { close(Fd); } - virtual size_t GetBytes(unsigned char *buf, size_t len) { + virtual size_t GetBytes(unsigned char *buf, size_t len) LLVM_OVERRIDE { NumStreamFetches++; return read(Fd, buf, len); } @@ -66,8 +66,8 @@ public: error_code OpenFile(const std::string &Filename) { if (Filename == "-") { Fd = 0; - sys::Program::ChangeStdinToBinary(); - return error_code(); + sys::ChangeStdinToBinary(); + return error_code::success(); } int OpenFlags = O_RDONLY; @@ -77,7 +77,7 @@ public: Fd = ::open(Filename.c_str(), OpenFlags); if (Fd == -1) return error_code(errno, posix_category()); - return error_code(); + return error_code::success(); } };