[all-commits] [llvm/llvm-project] 17dde8: [Support] Add a function to print the debug log (#...
Benjamin Stott via All-commits
all-commits at lists.llvm.org
Tue May 12 06:59:58 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 17dde875c1064ad5150a48572008a826b8869103
https://github.com/llvm/llvm-project/commit/17dde875c1064ad5150a48572008a826b8869103
Author: Benjamin Stott <Benjamin.Stott at sony.com>
Date: 2026-05-12 (Tue, 12 May 2026)
Changed paths:
M llvm/include/llvm/Support/Debug.h
M llvm/lib/Support/Debug.cpp
Log Message:
-----------
[Support] Add a function to print the debug log (#197184)
With `EnableDebugBuffering`, the debug log is stored in a circular
buffer and printed, with a nice banner, on program termination - this is
achieved via a signal handler. For in-process tool execution, such as
for running the regression tests using daemon versions of the tools, we
need to be able to trigger the printing/flushing of the debug log from
the process itself. This PR just adds a small function `printDebugLog`
which checks if debug output and debug log buffering are enabled and, if
so, prints the debug log.
The code for printing the debug log in the signal handler is moved to a
new function `printDebugLogImpl` which is called by the signal handler
and `printDebugLog` - the reason this is separate from `printDebugLog`
is to avoid running the option check in the signal handler
implementation, in case options were reset before the signal handler is
called, as this would be an unintentional behavioral change.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list