llvm.org GIT mirror llvm / f2c4103
PDB/BinaryStreamTest.cpp: Appease mingw to avoid std::errc::no_buffer_space. Unfortunately, mingw's libstdc++ doesn't provide winsock2 errors. That said, we should avoid raising OS-oriented error code in our code. For now, I suggest to define custom error from std::error_category. See also; https://reviews.llvm.org/D20592 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296581 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 2 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
5555 Error readBytes(uint32_t Offset, uint32_t Size,
5656 ArrayRef &Buffer) override {
5757 if (Offset + Size > Data.size())
58 return errorCodeToError(make_error_code(std::errc::no_buffer_space));
58 return errorCodeToError(make_error_code(std::errc::function_not_supported));
5959 uint32_t S = startIndex(Offset);
6060 auto Ref = Data.drop_front(S);
6161 if (Ref.size() >= Size) {
7474 Error readLongestContiguousChunk(uint32_t Offset,
7575 ArrayRef &Buffer) override {
7676 if (Offset >= Data.size())
77 return errorCodeToError(make_error_code(std::errc::no_buffer_space));
77 return errorCodeToError(make_error_code(std::errc::function_not_supported));
7878 uint32_t S = startIndex(Offset);
7979 Buffer = Data.drop_front(S);
8080 return Error::success();
8484
8585 Error writeBytes(uint32_t Offset, ArrayRef SrcData) override {
8686 if (Offset + SrcData.size() > Data.size())
87 return errorCodeToError(make_error_code(std::errc::no_buffer_space));
87 return errorCodeToError(make_error_code(std::errc::function_not_supported));
8888 if (SrcData.empty())
8989 return Error::success();
9090