llvm-project/lld/test/ELF/crash-report.test
Ben Dunbobbin dfb77f2e99 [LLD][ELF] Add FORCE_LLD_DIAGNOSTICS_CRASH to force LLD to crash
Add FORCE_LLD_DIAGNOSTICS_CRASH inspired by the existing
FORCE_CLANG_DIAGNOSTICS_CRASH.

This is particularly useful for people customizing LLD as they may
want to modify the crash reporting behavior.

Differential Revision: https://reviews.llvm.org/D128195
2022-07-05 09:43:09 +01:00

11 lines
393 B
Plaintext

# REQUIRES: backtrace
## Test the diagnostics produced when LLD crashes.
# RUN: env FORCE_LLD_DIAGNOSTICS_CRASH=1 not --crash ld.lld -o /dev/null 2>&1 | FileCheck %s
## Check the crash text has the correct structure.
# CHECK: crashing due to environment variable FORCE_LLD_DIAGNOSTICS_CRASH
# CHECK: PLEASE submit a bug report to {{.*}} and include the crash backtrace
# CHECK: Stack dump: