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...); }