[llvm] [Offload] Remove use of raw Linux fd for error reporting (PR #195073)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 30 05:51:52 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-offload
Author: Joseph Huber (jhuber6)
<details>
<summary>Changes</summary>
Summary:
This is a blocker on builiding Windows, we should be able to share the
common err stream tha LLVM provides
---
Full diff: https://github.com/llvm/llvm-project/pull/195073.diff
1 Files Affected:
- (modified) offload/plugins-nextgen/common/include/ErrorReporting.h (+2-3)
``````````diff
diff --git a/offload/plugins-nextgen/common/include/ErrorReporting.h b/offload/plugins-nextgen/common/include/ErrorReporting.h
index 68d82cbea0f3c..ff7d9b4f39d2b 100644
--- a/offload/plugins-nextgen/common/include/ErrorReporting.h
+++ b/offload/plugins-nextgen/common/include/ErrorReporting.h
@@ -28,7 +28,6 @@
#include <functional>
#include <optional>
#include <string>
-#include <unistd.h>
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...);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/195073
More information about the llvm-commits
mailing list