X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FSupport%2FDataStream.cpp;h=32653de5194383549de9bb6b88b427383cca9f1f;hb=f15492fd7292563049ace40be9a2e0048e64b8f0;hp=299e6c57ae4d0f6ee1134961f3dfe3e4b69d2a8b;hpb=1bab2d53996ca082150f34d8dafc1968fb5ecba9;p=oota-llvm.git diff --git a/lib/Support/DataStream.cpp b/lib/Support/DataStream.cpp index 299e6c57ae4..32653de5194 100644 --- a/lib/Support/DataStream.cpp +++ b/lib/Support/DataStream.cpp @@ -18,10 +18,10 @@ #include "llvm/ADT/Statistic.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Program.h" -#include "llvm/Support/system_error.h" #include #include #include +#include #if !defined(_MSC_VER) && !defined(__MINGW32__) #include #else @@ -64,11 +64,11 @@ public: return read(Fd, buf, len); } - error_code OpenFile(const std::string &Filename) { + std::error_code OpenFile(const std::string &Filename) { if (Filename == "-") { Fd = 0; sys::ChangeStdinToBinary(); - return error_code(); + return std::error_code(); } return sys::fs::openFileForRead(Filename, Fd); @@ -81,7 +81,7 @@ namespace llvm { DataStreamer *getDataFileStreamer(const std::string &Filename, std::string *StrError) { DataFileStreamer *s = new DataFileStreamer(); - if (error_code e = s->OpenFile(Filename)) { + if (std::error_code e = s->OpenFile(Filename)) { *StrError = std::string("Could not open ") + Filename + ": " + e.message() + "\n"; return nullptr;