From d6410f30d7497fb49f1c09f7841d73d6f3696346 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 30 Apr 2026 09:25:03 -0500 Subject: [PATCH] [Offload] Remove use of raw Linux fd for error reporting (#195073) Summary: This is a blocker on builiding Windows, we should be able to share the common err stream tha LLVM provides --- offload/plugins-nextgen/common/include/ErrorReporting.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/offload/plugins-nextgen/common/include/ErrorReporting.h b/offload/plugins-nextgen/common/include/ErrorReporting.h index 68d82cbea0f3..ff7d9b4f39d2 100644 --- a/offload/plugins-nextgen/common/include/ErrorReporting.h +++ b/offload/plugins-nextgen/common/include/ErrorReporting.h @@ -28,7 +28,6 @@ #include #include #include -#include namespace llvm { namespace omp { @@ -83,7 +82,7 @@ class ErrorReporter { [[gnu::format(__printf__, 1, 2)]] #endif static void print(const char *Format, ArgsTy &&...Args) { - raw_fd_ostream OS(STDERR_FILENO, false); + auto &OS = llvm::errs(); OS << llvm::format(Format, Args...); } @@ -94,7 +93,7 @@ class ErrorReporter { [[gnu::format(__printf__, 2, 3)]] #endif static void print(ColorTy Color, const char *Format, ArgsTy &&...Args) { - raw_fd_ostream OS(STDERR_FILENO, false); + auto &OS = llvm::errs(); WithColor(OS, HighlightColor(Color)) << llvm::format(Format, Args...); }