[llvm] r210630 - There is no posix_category in std, use generic_category.
Rafael Espindola
rafael.espindola at gmail.com
Tue Jun 10 20:49:13 PDT 2014
Author: rafael
Date: Tue Jun 10 22:49:13 2014
New Revision: 210630
URL: http://llvm.org/viewvc/llvm-project?rev=210630&view=rev
Log:
There is no posix_category in std, use generic_category.
Modified:
llvm/trunk/include/llvm/Support/system_error.h
llvm/trunk/lib/Support/MemoryBuffer.cpp
llvm/trunk/lib/Support/system_error.cpp
Modified: llvm/trunk/include/llvm/Support/system_error.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/system_error.h?rev=210630&r1=210629&r2=210630&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/system_error.h (original)
+++ llvm/trunk/include/llvm/Support/system_error.h Tue Jun 10 22:49:13 2014
@@ -650,11 +650,6 @@ public:
const error_category& generic_category();
const error_category& system_category();
-/// Get the error_category used for errno values from POSIX functions. This is
-/// the same as the system_category on POSIX systems, but is the same as the
-/// generic_category on Windows.
-const error_category& posix_category();
-
class error_condition
{
int _val_;
Modified: llvm/trunk/lib/Support/MemoryBuffer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/MemoryBuffer.cpp?rev=210630&r1=210629&r2=210630&view=diff
==============================================================================
--- llvm/trunk/lib/Support/MemoryBuffer.cpp (original)
+++ llvm/trunk/lib/Support/MemoryBuffer.cpp Tue Jun 10 22:49:13 2014
@@ -222,7 +222,7 @@ static error_code getMemoryBufferForStre
ReadBytes = read(FD, Buffer.end(), ChunkSize);
if (ReadBytes == -1) {
if (errno == EINTR) continue;
- return error_code(errno, posix_category());
+ return error_code(errno, generic_category());
}
Buffer.set_size(Buffer.size() + ReadBytes);
} while (ReadBytes != 0);
@@ -370,7 +370,7 @@ static error_code getOpenFileImpl(int FD
size_t BytesLeft = MapSize;
#ifndef HAVE_PREAD
if (lseek(FD, Offset, SEEK_SET) == -1)
- return error_code(errno, posix_category());
+ return error_code(errno, generic_category());
#endif
while (BytesLeft) {
@@ -383,7 +383,7 @@ static error_code getOpenFileImpl(int FD
if (errno == EINTR)
continue;
// Error while reading.
- return error_code(errno, posix_category());
+ return error_code(errno, generic_category());
}
if (NumRead == 0) {
memset(BufPtr, 0, BytesLeft); // zero-initialize rest of the buffer.
Modified: llvm/trunk/lib/Support/system_error.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/system_error.cpp?rev=210630&r1=210629&r2=210630&view=diff
==============================================================================
--- llvm/trunk/lib/Support/system_error.cpp (original)
+++ llvm/trunk/lib/Support/system_error.cpp Tue Jun 10 22:49:13 2014
@@ -96,15 +96,6 @@ system_category() {
return s;
}
-const error_category&
-posix_category() {
-#ifdef LLVM_ON_WIN32
- return generic_category();
-#else
- return system_category();
-#endif
-}
-
// error_condition
std::string
More information about the llvm-commits
mailing list