Skip to content

Commit 8358437

Browse files
authored
[clang-repl]: Print stack-trace on crash (#117896)
Call `llvm::sys::PrintStackTraceOnErrorSignal` at the start of main to 1. Print a strack trace on crash 2. Disable the assertion failed popup in Windows Debug Builds Other tools (for example clang-check or clang-query) already do this. This fixes debug build bots on windows hanging (waiting for the popup to be dismissed) and ultimately getting terminated due to timeout.
1 parent 24593f1 commit 8358437

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/tools/clang-repl/ClangRepl.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ ReplListCompleter::operator()(llvm::StringRef Buffer, size_t Pos,
139139

140140
llvm::ExitOnError ExitOnErr;
141141
int main(int argc, const char **argv) {
142+
llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
143+
142144
ExitOnErr.setBanner("clang-repl: ");
143145
llvm::cl::ParseCommandLineOptions(argc, argv);
144146

0 commit comments

Comments
 (0)