Skip to content

[Support] report_fatal_error: Do not generate crash backtrace by default #128495

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
98 changes: 49 additions & 49 deletions llvm/include/llvm/Support/ErrorHandling.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,58 +68,58 @@ namespace llvm {
/// After the error handler is called this function will call abort(), it
/// does not return.
/// NOTE: The std::string variant was removed to avoid a <string> dependency.
[[noreturn]] void report_fatal_error(const char *reason,
bool gen_crash_diag = true);
[[noreturn]] void report_fatal_error(StringRef reason,
bool gen_crash_diag = true);
[[noreturn]] void report_fatal_error(const Twine &reason,
bool gen_crash_diag = true);

/// Installs a new bad alloc error handler that should be used whenever a
/// bad alloc error, e.g. failing malloc/calloc, is encountered by LLVM.
///
/// The user can install a bad alloc handler, in order to define the behavior
/// in case of failing allocations, e.g. throwing an exception. Note that this
/// handler must not trigger any additional allocations itself.
///
/// If no error handler is installed the default is to print the error message
/// to stderr, and call exit(1). If an error handler is installed then it is
/// the handler's responsibility to log the message, it will no longer be
/// printed to stderr. If the error handler returns, then exit(1) will be
/// called.
///
///
/// \param user_data - An argument which will be passed to the installed error
/// handler.
void install_bad_alloc_error_handler(fatal_error_handler_t handler,
void *user_data = nullptr);
[[noreturn]] void report_fatal_error(const char *reason,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should not be indented. Instead, the rest of the file should be unindented.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I should address the clang format in a pre patch

bool gen_crash_diag = false);
[[noreturn]] void report_fatal_error(StringRef reason,
bool gen_crash_diag = false);
[[noreturn]] void report_fatal_error(const Twine &reason,
bool gen_crash_diag = false);

/// Installs a new bad alloc error handler that should be used whenever a
/// bad alloc error, e.g. failing malloc/calloc, is encountered by LLVM.
///
/// The user can install a bad alloc handler, in order to define the behavior
/// in case of failing allocations, e.g. throwing an exception. Note that this
/// handler must not trigger any additional allocations itself.
///
/// If no error handler is installed the default is to print the error message
/// to stderr, and call exit(1). If an error handler is installed then it is
/// the handler's responsibility to log the message, it will no longer be
/// printed to stderr. If the error handler returns, then exit(1) will be
/// called.
///
///
/// \param user_data - An argument which will be passed to the installed error
/// handler.
void install_bad_alloc_error_handler(fatal_error_handler_t handler,
void *user_data = nullptr);

/// Restores default bad alloc error handling behavior.
void remove_bad_alloc_error_handler();
/// Restores default bad alloc error handling behavior.
void remove_bad_alloc_error_handler();

void install_out_of_memory_new_handler();
void install_out_of_memory_new_handler();

/// Reports a bad alloc error, calling any user defined bad alloc
/// error handler. In contrast to the generic 'report_fatal_error'
/// functions, this function might not terminate, e.g. the user
/// defined error handler throws an exception, but it won't return.
///
/// Note: When throwing an exception in the bad alloc handler, make sure that
/// the following unwind succeeds, e.g. do not trigger additional allocations
/// in the unwind chain.
///
/// If no error handler is installed (default), throws a bad_alloc exception
/// if LLVM is compiled with exception support. Otherwise prints the error
/// to standard error and calls abort().
[[noreturn]] void report_bad_alloc_error(const char *Reason,
bool GenCrashDiag = true);

/// This function calls abort(), and prints the optional message to stderr.
/// Use the llvm_unreachable macro (that adds location info), instead of
/// calling this function directly.
[[noreturn]] void
llvm_unreachable_internal(const char *msg = nullptr, const char *file = nullptr,
unsigned line = 0);
/// Reports a bad alloc error, calling any user defined bad alloc
/// error handler. In contrast to the generic 'report_fatal_error'
/// functions, this function might not terminate, e.g. the user
/// defined error handler throws an exception, but it won't return.
///
/// Note: When throwing an exception in the bad alloc handler, make sure that
/// the following unwind succeeds, e.g. do not trigger additional allocations
/// in the unwind chain.
///
/// If no error handler is installed (default), throws a bad_alloc exception
/// if LLVM is compiled with exception support. Otherwise prints the error
/// to standard error and calls abort().
[[noreturn]] void report_bad_alloc_error(const char *Reason,
bool GenCrashDiag = true);

/// This function calls abort(), and prints the optional message to stderr.
/// Use the llvm_unreachable macro (that adds location info), instead of
/// calling this function directly.
[[noreturn]] void llvm_unreachable_internal(const char *msg = nullptr,
const char *file = nullptr,
unsigned line = 0);
}

/// Marks that the current location is not supposed to be reachable.
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; RUN: llc -O0 -global-isel -global-isel-abort=2 -pass-remarks-missed='gisel*' -verify-machineinstrs %s -o %t.out 2> %t.err
; RUN: FileCheck %s --check-prefix=FALLBACK-WITH-REPORT-OUT < %t.out
; RUN: FileCheck %s --check-prefix=FALLBACK-WITH-REPORT-ERR < %t.err
; RUN: not --crash llc -global-isel -mtriple aarch64_be %s -o - 2>&1 | FileCheck %s --check-prefix=BIG-ENDIAN
; RUN: not llc -global-isel -mtriple aarch64_be %s -o - 2>&1 | FileCheck %s --check-prefix=BIG-ENDIAN
; This file checks that the fallback path to selection dag works.
; The test is fragile in the sense that it must be updated to expose
; something that fails with global-isel.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: not --crash llc %s -mtriple aarch64-apple-darwin -debug-only=aarch64-call-lowering -global-isel -global-isel-abort=2 -o - 2>&1 | FileCheck %s
; RUN: not llc %s -mtriple aarch64-apple-darwin -debug-only=aarch64-call-lowering -global-isel -global-isel-abort=2 -o - 2>&1 | FileCheck %s
; REQUIRES: asserts

; Verify that we fall back to SelectionDAG, and error out when we can't tail call musttail functions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: not --crash llc -mtriple=aarch64-- -run-pass=legalizer %s -o - 2>&1 | FileCheck %s
# RUN: not llc -mtriple=aarch64-- -run-pass=legalizer %s -o - 2>&1 | FileCheck %s

# This is to demonstrate what kind of bugs we're missing w/o some kind
# of validation for LegalizerInfo: G_INTTOPTR could only be legal /
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: not --crash llc -mtriple=aarch64-- -run-pass=legalizer %s -o - 2>&1 | FileCheck %s
# RUN: not llc -mtriple=aarch64-- -run-pass=legalizer %s -o - 2>&1 | FileCheck %s

# This is to demonstrate what kind of bugs we're missing w/o some kind
# of validation for LegalizerInfo: G_INTTOPTR could only be legal /
Expand Down
18 changes: 9 additions & 9 deletions llvm/test/CodeGen/AArch64/GlobalISel/ptrauth-constant-in-code.ll
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

;--- err1.ll

; RUN: not --crash llc < err1.ll -mtriple aarch64-elf -mattr=+pauth \
; RUN: not llc < err1.ll -mtriple aarch64-elf -mattr=+pauth \
; RUN: -global-isel=1 -verify-machineinstrs -global-isel-abort=1 2>&1 | \
; RUN: FileCheck --check-prefix=ERR1 %s
; RUN: not --crash llc < err1.ll -mtriple arm64-apple-ios -mattr=+pauth \
; RUN: not llc < err1.ll -mtriple arm64-apple-ios -mattr=+pauth \
; RUN: -global-isel=1 -verify-machineinstrs -global-isel-abort=1 2>&1 | \
; RUN: FileCheck --check-prefix=ERR1 %s

Expand All @@ -18,10 +18,10 @@ define ptr @foo() {

;--- err2.ll

; RUN: not --crash llc < err2.ll -mtriple aarch64-elf -mattr=+pauth \
; RUN: not llc < err2.ll -mtriple aarch64-elf -mattr=+pauth \
; RUN: -global-isel=1 -verify-machineinstrs -global-isel-abort=1 2>&1 | \
; RUN: FileCheck --check-prefix=ERR2 %s
; RUN: not --crash llc < err2.ll -mtriple arm64-apple-ios -mattr=+pauth \
; RUN: not llc < err2.ll -mtriple arm64-apple-ios -mattr=+pauth \
; RUN: -global-isel=1 -verify-machineinstrs -global-isel-abort=1 2>&1 | \
; RUN: FileCheck --check-prefix=ERR2 %s

Expand All @@ -34,10 +34,10 @@ define ptr @foo() {

;--- err3.ll

; RUN: not --crash llc < err3.ll -mtriple aarch64-elf -mattr=+pauth \
; RUN: not llc < err3.ll -mtriple aarch64-elf -mattr=+pauth \
; RUN: -global-isel=1 -verify-machineinstrs -global-isel-abort=1 2>&1 | \
; RUN: FileCheck --check-prefix=ERR3 %s
; RUN: not --crash llc < err3.ll -mtriple arm64-apple-ios -mattr=+pauth \
; RUN: not llc < err3.ll -mtriple arm64-apple-ios -mattr=+pauth \
; RUN: -global-isel=1 -verify-machineinstrs -global-isel-abort=1 2>&1 | \
; RUN: FileCheck --check-prefix=ERR3 %s

Expand All @@ -50,10 +50,10 @@ define ptr @foo() {

;--- err4.ll

; RUN: not --crash llc < err4.ll -mtriple aarch64-elf -mattr=+pauth \
; RUN: not llc < err4.ll -mtriple aarch64-elf -mattr=+pauth \
; RUN: -global-isel=1 -verify-machineinstrs -global-isel-abort=1 2>&1 | \
; RUN: FileCheck --check-prefix=ERR4 %s
; RUN: not --crash llc < err4.ll -mtriple arm64-apple-ios -mattr=+pauth \
; RUN: not llc < err4.ll -mtriple arm64-apple-ios -mattr=+pauth \
; RUN: -global-isel=1 -verify-machineinstrs -global-isel-abort=1 2>&1 | \
; RUN: FileCheck --check-prefix=ERR4 %s

Expand All @@ -67,7 +67,7 @@ define ptr @foo() {

;--- err5.ll

; RUN: not --crash llc < err5.ll -mtriple aarch64-windows -mattr=+pauth \
; RUN: not llc < err5.ll -mtriple aarch64-windows -mattr=+pauth \
; RUN: -global-isel=1 -verify-machineinstrs -global-isel-abort=1 2>&1 | \
; RUN: FileCheck --check-prefix=ERR5 %s

Expand Down
4 changes: 2 additions & 2 deletions llvm/test/CodeGen/AArch64/arm64-darwin-cc.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: sed -e "s,CC,cfguard_checkcc,g" %s | not --crash llc -mtriple=arm64-apple-darwin -o - 2>&1 | FileCheck %s --check-prefix=CFGUARD
; RUN: sed -e "s,CC,aarch64_sve_vector_pcs,g" %s | not --crash llc -mtriple=arm64-apple-darwin -o - 2>&1 | FileCheck %s --check-prefix=SVE_VECTOR_PCS
; RUN: sed -e "s,CC,cfguard_checkcc,g" %s | not llc -mtriple=arm64-apple-darwin -o - 2>&1 | FileCheck %s --check-prefix=CFGUARD
; RUN: sed -e "s,CC,aarch64_sve_vector_pcs,g" %s | not llc -mtriple=arm64-apple-darwin -o - 2>&1 | FileCheck %s --check-prefix=SVE_VECTOR_PCS

define CC void @f0() {
unreachable
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/CodeGen/AArch64/arm64-named-reg-alloc.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: not --crash llc < %s -mtriple=arm64-apple-darwin 2>&1 | FileCheck %s
; RUN: not --crash llc < %s -mtriple=arm64-linux-gnueabi 2>&1 | FileCheck %s
; RUN: not llc < %s -mtriple=arm64-apple-darwin 2>&1 | FileCheck %s
; RUN: not llc < %s -mtriple=arm64-linux-gnueabi 2>&1 | FileCheck %s

define i32 @get_stack() nounwind {
entry:
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/CodeGen/AArch64/arm64-named-reg-notareg.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: not --crash llc < %s -mtriple=arm64-apple-darwin 2>&1 | FileCheck %s
; RUN: not --crash llc < %s -mtriple=arm64-linux-gnueabi 2>&1 | FileCheck %s
; RUN: not llc < %s -mtriple=arm64-apple-darwin 2>&1 | FileCheck %s
; RUN: not llc < %s -mtriple=arm64-linux-gnueabi 2>&1 | FileCheck %s

define i32 @get_stack() nounwind {
entry:
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/AArch64/arm64-tls-dynamics.ll
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
; FIXME: We currently produce "small" code for the tiny model
; RUN: llc -mtriple=arm64-none-linux-gnu -relocation-model=pic -aarch64-elf-ldtls-generation=1 -code-model=tiny -verify-machineinstrs < %s | FileCheck %s
; FIXME: We currently error for the large code model
; RUN: not --crash llc -mtriple=arm64-none-linux-gnu -relocation-model=pic -aarch64-elf-ldtls-generation=1 -code-model=large -verify-machineinstrs < %s 2>&1 | FileCheck %s --check-prefix=CHECK-LARGE
; RUN: not llc -mtriple=arm64-none-linux-gnu -relocation-model=pic -aarch64-elf-ldtls-generation=1 -code-model=large -verify-machineinstrs < %s 2>&1 | FileCheck %s --check-prefix=CHECK-LARGE

; CHECK-LARGE: ELF TLS only supported in small memory model

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/AArch64/arm64-tls-initial-exec.ll
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
; RUN: llc -mtriple=arm64-none-linux-gnu -verify-machineinstrs -show-mc-encoding -code-model=tiny < %s | FileCheck %s --check-prefix=CHECK-TINY
; RUN: llc -mtriple=arm64-none-linux-gnu -filetype=obj < %s -code-model=tiny | llvm-objdump -r - | FileCheck --check-prefix=CHECK-TINY-RELOC %s
; FIXME: We currently error for the large code model
; RUN: not --crash llc -mtriple=arm64-none-linux-gnu -verify-machineinstrs -show-mc-encoding -code-model=large < %s 2>&1 | FileCheck %s --check-prefix=CHECK-LARGE
; RUN: not llc -mtriple=arm64-none-linux-gnu -verify-machineinstrs -show-mc-encoding -code-model=large < %s 2>&1 | FileCheck %s --check-prefix=CHECK-LARGE

; CHECK-LARGE: ELF TLS only supported in small memory model

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/AArch64/fast-isel-sp-adjust.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: llc -O0 -fast-isel -mtriple=aarch64-apple-ios -o - %s | FileCheck %s
; RUN: not --crash llc -O0 -mtriple=aarch64-apple-ios -o /dev/null -fast-isel -fast-isel-abort=3 %s 2> %t
; RUN: not llc -O0 -mtriple=aarch64-apple-ios -o /dev/null -fast-isel -fast-isel-abort=3 %s 2> %t
; RUN: FileCheck %s --check-prefix=CHECK-ERRORS < %t

; The issue here is that FastISel cannot emit an ADDrr where one of the inputs
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/CodeGen/AArch64/hardened-br-jump-table.ll
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

;--- err1.ll

; RUN: not --crash llc %t/err1.ll -mtriple=aarch64-elf \
; RUN: not llc %t/err1.ll -mtriple=aarch64-elf \
; RUN: -aarch64-min-jump-table-entries=1 -aarch64-enable-atomic-cfg-tidy=0 \
; RUN: -code-model=large \
; RUN: -o - -verify-machineinstrs 2>&1 | FileCheck %s --check-prefix=ERR1

; RUN: not --crash llc %t/err1.ll -mtriple=aarch64-elf \
; RUN: not llc %t/err1.ll -mtriple=aarch64-elf \
; RUN: -aarch64-min-jump-table-entries=1 -aarch64-enable-atomic-cfg-tidy=0 \
; RUN: -global-isel -global-isel-abort=1 \
; RUN: -code-model=large \
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/AArch64/ptrauth-arm64-tls-dynamics.ll
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; RUN: -verify-machineinstrs < %s | FileCheck %s
; RUN: llc -mtriple=aarch64-unknown-linux-gnu -mattr=+pauth -relocation-model=pic \
; RUN: -filetype=obj < %s | llvm-readelf -r -s - | FileCheck --check-prefix=CHECK-OBJ %s
; RUN: not --crash llc -mtriple=aarch64-unknown-linux-gnu -mattr=+pauth -relocation-model=pic \
; RUN: not llc -mtriple=aarch64-unknown-linux-gnu -mattr=+pauth -relocation-model=pic \
; RUN: -global-isel=1 < %s 2>&1 | FileCheck --check-prefix=CHECK-ERR %s

@general_dynamic_var = external thread_local global i32
Expand Down
18 changes: 9 additions & 9 deletions llvm/test/CodeGen/AArch64/ptrauth-constant-in-code.ll
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

;--- err1.ll

; RUN: not --crash llc < err1.ll -mtriple aarch64-elf -mattr=+pauth \
; RUN: not llc < err1.ll -mtriple aarch64-elf -mattr=+pauth \
; RUN: -global-isel=0 -verify-machineinstrs 2>&1 | FileCheck --check-prefix=ERR1 %s
; RUN: not --crash llc < err1.ll -mtriple arm64-apple-ios -mattr=+pauth \
; RUN: not llc < err1.ll -mtriple arm64-apple-ios -mattr=+pauth \
; RUN: -global-isel=0 -verify-machineinstrs 2>&1 | FileCheck --check-prefix=ERR1 %s

@g = external global i32
Expand All @@ -16,9 +16,9 @@ define ptr @foo() {

;--- err2.ll

; RUN: not --crash llc < err2.ll -mtriple aarch64-elf -mattr=+pauth \
; RUN: not llc < err2.ll -mtriple aarch64-elf -mattr=+pauth \
; RUN: -global-isel=0 -verify-machineinstrs 2>&1 | FileCheck --check-prefix=ERR2 %s
; RUN: not --crash llc < err2.ll -mtriple arm64-apple-ios -mattr=+pauth \
; RUN: not llc < err2.ll -mtriple arm64-apple-ios -mattr=+pauth \
; RUN: -global-isel=0 -verify-machineinstrs 2>&1 | FileCheck --check-prefix=ERR2 %s

@g = external global i32
Expand All @@ -30,9 +30,9 @@ define ptr @foo() {

;--- err3.ll

; RUN: not --crash llc < err3.ll -mtriple aarch64-elf -mattr=+pauth \
; RUN: not llc < err3.ll -mtriple aarch64-elf -mattr=+pauth \
; RUN: -global-isel=0 -verify-machineinstrs 2>&1 | FileCheck --check-prefix=ERR3 %s
; RUN: not --crash llc < err3.ll -mtriple arm64-apple-ios -mattr=+pauth \
; RUN: not llc < err3.ll -mtriple arm64-apple-ios -mattr=+pauth \
; RUN: -global-isel=0 -verify-machineinstrs 2>&1 | FileCheck --check-prefix=ERR3 %s

@g_weak = extern_weak global i32
Expand All @@ -44,9 +44,9 @@ define ptr @foo() {

;--- err4.ll

; RUN: not --crash llc < err4.ll -mtriple aarch64-elf -mattr=+pauth \
; RUN: not llc < err4.ll -mtriple aarch64-elf -mattr=+pauth \
; RUN: -global-isel=0 -verify-machineinstrs 2>&1 | FileCheck --check-prefix=ERR4 %s
; RUN: not --crash llc < err4.ll -mtriple arm64-apple-ios -mattr=+pauth \
; RUN: not llc < err4.ll -mtriple arm64-apple-ios -mattr=+pauth \
; RUN: -global-isel=0 -verify-machineinstrs 2>&1 | FileCheck --check-prefix=ERR4 %s

@g_weak = extern_weak global i32
Expand All @@ -59,7 +59,7 @@ define ptr @foo() {

;--- err5.ll

; RUN: not --crash llc < err5.ll -mtriple aarch64-windows -mattr=+pauth \
; RUN: not llc < err5.ll -mtriple aarch64-windows -mattr=+pauth \
; RUN: -global-isel=0 -verify-machineinstrs 2>&1 | FileCheck --check-prefix=ERR5 %s

@g = external global i32
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/CodeGen/AArch64/ptrauth-init-fini.ll
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ define void @bar() {

;--- err1.ll

; RUN: not --crash llc -mtriple aarch64-elf -mattr=+pauth -filetype=asm -o - err1.ll 2>&1 | \
; RUN: not llc -mtriple aarch64-elf -mattr=+pauth -filetype=asm -o - err1.ll 2>&1 | \
; RUN: FileCheck %s --check-prefix=ERR1

; ERR1: LLVM ERROR: unexpected address discrimination value for ctors/dtors entry, only 'ptr inttoptr (i64 1 to ptr)' is allowed
Expand All @@ -91,7 +91,7 @@ define void @foo() {

;--- err2.ll

; RUN: not --crash llc -mtriple aarch64-elf -mattr=+pauth -filetype=asm -o - err2.ll 2>&1 | \
; RUN: not llc -mtriple aarch64-elf -mattr=+pauth -filetype=asm -o - err2.ll 2>&1 | \
; RUN: FileCheck %s --check-prefix=ERR2

; ERR2: LLVM ERROR: unexpected address discrimination value for ctors/dtors entry, only 'ptr inttoptr (i64 1 to ptr)' is allowed
Expand Down
16 changes: 8 additions & 8 deletions llvm/test/CodeGen/AArch64/ptrauth-reloc.ll
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@

;--- err-key.ll

; RUN: not --crash llc < err-key.ll -mtriple arm64e-apple-darwin 2>&1 \
; RUN: not llc < err-key.ll -mtriple arm64e-apple-darwin 2>&1 \
; RUN: | FileCheck %s --check-prefix=CHECK-ERR-KEY
; RUN: not --crash llc < err-key.ll -mtriple aarch64-elf -mattr=+pauth 2>&1 \
; RUN: not llc < err-key.ll -mtriple aarch64-elf -mattr=+pauth 2>&1 \
; RUN: | FileCheck %s --check-prefix=CHECK-ERR-KEY

; RUN: not --crash llc < err-key.ll -mtriple arm64e-apple-darwin \
; RUN: not llc < err-key.ll -mtriple arm64e-apple-darwin \
; RUN: -global-isel -verify-machineinstrs -global-isel-abort=1 2>&1 \
; RUN: | FileCheck %s --check-prefix=CHECK-ERR-KEY
; RUN: not --crash llc < err-key.ll -mtriple aarch64-elf -mattr=+pauth \
; RUN: not llc < err-key.ll -mtriple aarch64-elf -mattr=+pauth \
; RUN: -global-isel -verify-machineinstrs -global-isel-abort=1 2>&1 \
; RUN: | FileCheck %s --check-prefix=CHECK-ERR-KEY

Expand All @@ -158,15 +158,15 @@

;--- err-disc.ll

; RUN: not --crash llc < err-disc.ll -mtriple arm64e-apple-darwin 2>&1 \
; RUN: not llc < err-disc.ll -mtriple arm64e-apple-darwin 2>&1 \
; RUN: | FileCheck %s --check-prefix=CHECK-ERR-DISC
; RUN: not --crash llc < err-disc.ll -mtriple aarch64-elf -mattr=+pauth 2>&1 \
; RUN: not llc < err-disc.ll -mtriple aarch64-elf -mattr=+pauth 2>&1 \
; RUN: | FileCheck %s --check-prefix=CHECK-ERR-DISC

; RUN: not --crash llc < err-disc.ll -mtriple arm64e-apple-darwin \
; RUN: not llc < err-disc.ll -mtriple arm64e-apple-darwin \
; RUN: -global-isel -verify-machineinstrs -global-isel-abort=1 2>&1 \
; RUN: | FileCheck %s --check-prefix=CHECK-ERR-DISC
; RUN: not --crash llc < err-disc.ll -mtriple aarch64-elf -mattr=+pauth \
; RUN: not llc < err-disc.ll -mtriple aarch64-elf -mattr=+pauth \
; RUN: -global-isel -verify-machineinstrs -global-isel-abort=1 2>&1 \
; RUN: | FileCheck %s --check-prefix=CHECK-ERR-DISC

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/AArch64/shadow-call-stack.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: llc -verify-machineinstrs -o - %s -mtriple=aarch64-linux-gnu -mattr=+reserve-x18 | FileCheck %s
; RUN: not --crash llc -verify-machineinstrs -o - %s -mtriple=arm64-apple-darwin 2>&1 | FileCheck %s --check-prefix=DARWIN
; RUN: not llc -verify-machineinstrs -o - %s -mtriple=arm64-apple-darwin 2>&1 | FileCheck %s --check-prefix=DARWIN

; DARWIN: ShadowCallStack attribute not supported on Darwin.

Expand Down
Loading
Loading