[PATCH] D119181: [Support] Don't print stacktrace if DbgHelp.dll hasn't been loaded yet

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 8 05:30:12 PST 2022


aganea accepted this revision.
aganea added a comment.
This revision is now accepted and ready to land.

LGTM with a comment:



================
Comment at: llvm/utils/unittest/UnitTestMain/TestMain.cpp:25
 int main(int argc, char **argv) {
-  llvm::sys::PrintStackTraceOnErrorSignal(argv[0],
-                                          true /* Disable crash reporting */);
+  if (getenv("LLVM_PROGRAM_TEST_NO_STACKTRACE_HANDLER")) {
+    // Skip setting up signal handlers for tests that need to tests things
----------------
I think it's more desirable to not have an empty block. You could could do `if (!getenv...)` and add the comment above the if statement.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119181/new/

https://reviews.llvm.org/D119181



More information about the llvm-commits mailing list