[PATCH] D147632: [libunwind] Fflush stderr after each log message
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 6 01:09:28 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa33d5a9939aa: [libunwind] Fflush stderr after each log message (authored by mstorsjo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147632/new/
https://reviews.llvm.org/D147632
Files:
libunwind/src/config.h
Index: libunwind/src/config.h
===================================================================
--- libunwind/src/config.h
+++ libunwind/src/config.h
@@ -162,10 +162,14 @@
#define _LIBUNWIND_LOG0(msg)
#define _LIBUNWIND_LOG(msg, ...)
#else
-#define _LIBUNWIND_LOG0(msg) \
- fprintf(stderr, "libunwind: " msg "\n")
-#define _LIBUNWIND_LOG(msg, ...) \
- fprintf(stderr, "libunwind: " msg "\n", __VA_ARGS__)
+#define _LIBUNWIND_LOG0(msg) do { \
+ fprintf(stderr, "libunwind: " msg "\n"); \
+ fflush(stderr); \
+ } while (0)
+#define _LIBUNWIND_LOG(msg, ...) do { \
+ fprintf(stderr, "libunwind: " msg "\n", __VA_ARGS__); \
+ fflush(stderr); \
+ } while (0)
#endif
#if defined(NDEBUG)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147632.511312.patch
Type: text/x-patch
Size: 1057 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230406/c3e8671f/attachment.bin>
More information about the llvm-commits
mailing list