From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Tue, 17 Sep 2024 15:30:31 -0700 Subject: [PATCH 28/34] raw_ostream: Replace errnoAsErrorCode() --- llvm/lib/Support/raw_ostream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp index 09f7ede10e4c3decb2c6d70a3e8ce7660f542519..a9cea8ac7fa2a7edbfeb76dbed6a92e189edbbd9 100644 --- a/llvm/lib/Support/raw_ostream.cpp +++ b/llvm/lib/Support/raw_ostream.cpp @@ -518,7 +518,7 @@ void raw_fd_ostream::write_impl(const char *Ptr, size_t Size) { } #endif // Otherwise it's a non-recoverable error. Note it and quit. - error_detected(errnoAsErrorCode()); + error_detected(std::error_code(errno, std::generic_category())); break; } @@ -548,7 +548,7 @@ uint64_t raw_fd_ostream::seek(uint64_t off) { pos = ::lseek(FD, off, SEEK_SET); #endif if (pos == (uint64_t)-1) - error_detected(errnoAsErrorCode()); + error_detected(std::error_code(errno, std::generic_category())); return pos; }