projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Delete dead code.
[oota-llvm.git]
/
lib
/
Support
/
DataStream.cpp
diff --git
a/lib/Support/DataStream.cpp
b/lib/Support/DataStream.cpp
index 0e8a717b51521c23dde0fd64f88994ce5d2ec1c6..7815d08092e0e0448e9a03045aec354c342464d7 100644
(file)
--- a/
lib/Support/DataStream.cpp
+++ b/
lib/Support/DataStream.cpp
@@
-15,13
+15,13
@@
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "Data-stream"
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "Data-stream"
-#include "llvm/ADT/Statistic.h"
#include "llvm/Support/DataStream.h"
#include "llvm/Support/DataStream.h"
+#include "llvm/ADT/Statistic.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/system_error.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/system_error.h"
-#include <string>
#include <cerrno>
#include <cstdio>
#include <cerrno>
#include <cstdio>
+#include <string>
#if !defined(_MSC_VER) && !defined(__MINGW32__)
#include <unistd.h>
#else
#if !defined(_MSC_VER) && !defined(__MINGW32__)
#include <unistd.h>
#else
@@
-58,7
+58,7
@@
public:
virtual ~DataFileStreamer() {
close(Fd);
}
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);
}
NumStreamFetches++;
return read(Fd, buf, len);
}
@@
-66,8
+66,8
@@
public:
error_code OpenFile(const std::string &Filename) {
if (Filename == "-") {
Fd = 0;
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;
}
int OpenFlags = O_RDONLY;
@@
-77,7
+77,7
@@
public:
Fd = ::open(Filename.c_str(), OpenFlags);
if (Fd == -1)
return error_code(errno, posix_category());
Fd = ::open(Filename.c_str(), OpenFlags);
if (Fd == -1)
return error_code(errno, posix_category());
- return error_code();
+ return error_code
::success
();
}
};
}
};