-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
[Support] report_fatal_error: Do not generate crash backtrace by default #128495
base: main
Are you sure you want to change the base?
Conversation
@llvm/pr-subscribers-llvm-binary-utilities @llvm/pr-subscribers-backend-webassembly Author: Akshat Oke (optimisan) Changes
I reckon having default Patch is 311.05 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/128495.diff 387 Files Affected:
diff --git a/llvm/include/llvm/Support/ErrorHandling.h b/llvm/include/llvm/Support/ErrorHandling.h
index 9c8e3448f3a03..8dd2ba10648d3 100644
--- a/llvm/include/llvm/Support/ErrorHandling.h
+++ b/llvm/include/llvm/Support/ErrorHandling.h
@@ -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,
+ 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.
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll b/llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
index 29c320da6c0a7..c12853f919271 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
@@ -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.
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/call-translator-musttail.ll b/llvm/test/CodeGen/AArch64/GlobalISel/call-translator-musttail.ll
index 0894fbeb34a95..72af098a89469 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/call-translator-musttail.ll
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/call-translator-musttail.ll
@@ -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
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-1.mir b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-1.mir
index 9c318b7574b87..4879b8343ed59 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-1.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-1.mir
@@ -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 /
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-2.mir b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-2.mir
index bbdc54a512197..8e8e8b29c778f 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-2.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-2.mir
@@ -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 /
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/ptrauth-constant-in-code.ll b/llvm/test/CodeGen/AArch64/GlobalISel/ptrauth-constant-in-code.ll
index 12a3448111fcb..2491af1ea23fd 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/ptrauth-constant-in-code.ll
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/ptrauth-constant-in-code.ll
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
diff --git a/llvm/test/CodeGen/AArch64/arm64-darwin-cc.ll b/llvm/test/CodeGen/AArch64/arm64-darwin-cc.ll
index 9e18f778d1c46..0f526dad5bd83 100644
--- a/llvm/test/CodeGen/AArch64/arm64-darwin-cc.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-darwin-cc.ll
@@ -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
diff --git a/llvm/test/CodeGen/AArch64/arm64-named-reg-alloc.ll b/llvm/test/CodeGen/AArch64/arm64-named-reg-alloc.ll
index bd14ec61b55cc..5d48c17e12862 100644
--- a/llvm/test/CodeGen/AArch64/arm64-named-reg-alloc.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-named-reg-alloc.ll
@@ -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:
diff --git a/llvm/test/CodeGen/AArch64/arm64-named-reg-notareg.ll b/llvm/test/CodeGen/AArch64/arm64-named-reg-notareg.ll
index fe5f000a393e7..8a5fd6f1ac8bd 100644
--- a/llvm/test/CodeGen/AArch64/arm64-named-reg-notareg.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-named-reg-notareg.ll
@@ -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:
diff --git a/llvm/test/CodeGen/AArch64/arm64-tls-dynamics.ll b/llvm/test/CodeGen/AArch64/arm64-tls-dynamics.ll
index c12730bd3b0d7..8ddcd0b93ea87 100644
--- a/llvm/test/CodeGen/AArch64/arm64-tls-dynamics.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-tls-dynamics.ll
@@ -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
diff --git a/llvm/test/CodeGen/AArch64/arm64-tls-initial-exec.ll b/llvm/test/CodeGen/AArch64/arm64-tls-initial-exec.ll
index c5a1144964976..437c169087c5b 100644
--- a/llvm/test/CodeGen/AArch64/arm64-tls-initial-exec.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-tls-initial-exec.ll
@@ -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
diff --git a/llvm/test/CodeGen/AArch64/fast-isel-sp-adjust.ll b/llvm/test/CodeGen/AArch64/fast-isel-sp-adjust.ll
index 22e3ccf2b1209..670b49f002be0 100644
--- a/llvm/test/CodeGen/AArch64/fast-isel-sp-adjust.ll
+++ b/llvm/test/CodeGen/AArch64/fast-isel-sp-adjust.ll
@@ -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
diff --git a/llvm/test/CodeGen/AArch64/hardened-br-jump-table.ll b/llvm/test/CodeGen/AArch64/hardened-br-jump-table.ll
index f20ea4db7baeb..80e1c6429cc25 100644
--- a/llvm/test/CodeGen/AArch64/hardened-br-jump-table.ll
+++ b/llvm/test/CodeGen/AArch64/hardened-br-jump-table.ll
@@ -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 \
diff --git a/llvm/test/CodeGen/AArch64/ptrauth-arm64-tls-dynamics.ll b/llvm/test/CodeGen/AArch64/ptrauth-arm64-tls-dynamics.ll
index 89731e62dcc1e..2d8085cf489b9 100644
--- a/llvm/test/CodeGen/AArch64/ptrauth-arm64-tls-dynamics.ll
+++ b/llvm/test/CodeGen/AArch64/ptrauth-arm64-tls-dynamics.ll
@@ -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
diff --git a/llvm/test/CodeGen/AArch64/ptrauth-constant-in-code.ll b/llvm/test/CodeGen/AArch64/ptrauth-constant-in-code.ll
index 76339a7cc5791..a323c0fd1ed33 100644
--- a/llvm/test/CodeGen/AArch64/ptrauth-constant-in-code.ll
+++ b/llvm/test/CodeGen/AArch64/ptrauth-constant-in-code.ll
@@ -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
@@ -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
@@ -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
@@ -44,9 +44,9 @@ define ptr @foo() {
;--- err4.ll
-; RUN: not --crash llc < err4.ll -mtriple aarch64-elf -mattr=+pauth \
+; RUN: not llc < err4.l...
[truncated]
|
@llvm/pr-subscribers-backend-amdgpu Author: Akshat Oke (optimisan) Changes
I reckon having default Patch is 311.05 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/128495.diff 387 Files Affected:
diff --git a/llvm/include/llvm/Support/ErrorHandling.h b/llvm/include/llvm/Support/ErrorHandling.h
index 9c8e3448f3a03..8dd2ba10648d3 100644
--- a/llvm/include/llvm/Support/ErrorHandling.h
+++ b/llvm/include/llvm/Support/ErrorHandling.h
@@ -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,
+ 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.
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll b/llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
index 29c320da6c0a7..c12853f919271 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
@@ -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.
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/call-translator-musttail.ll b/llvm/test/CodeGen/AArch64/GlobalISel/call-translator-musttail.ll
index 0894fbeb34a95..72af098a89469 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/call-translator-musttail.ll
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/call-translator-musttail.ll
@@ -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
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-1.mir b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-1.mir
index 9c318b7574b87..4879b8343ed59 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-1.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-1.mir
@@ -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 /
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-2.mir b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-2.mir
index bbdc54a512197..8e8e8b29c778f 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-2.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-2.mir
@@ -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 /
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/ptrauth-constant-in-code.ll b/llvm/test/CodeGen/AArch64/GlobalISel/ptrauth-constant-in-code.ll
index 12a3448111fcb..2491af1ea23fd 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/ptrauth-constant-in-code.ll
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/ptrauth-constant-in-code.ll
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
diff --git a/llvm/test/CodeGen/AArch64/arm64-darwin-cc.ll b/llvm/test/CodeGen/AArch64/arm64-darwin-cc.ll
index 9e18f778d1c46..0f526dad5bd83 100644
--- a/llvm/test/CodeGen/AArch64/arm64-darwin-cc.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-darwin-cc.ll
@@ -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
diff --git a/llvm/test/CodeGen/AArch64/arm64-named-reg-alloc.ll b/llvm/test/CodeGen/AArch64/arm64-named-reg-alloc.ll
index bd14ec61b55cc..5d48c17e12862 100644
--- a/llvm/test/CodeGen/AArch64/arm64-named-reg-alloc.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-named-reg-alloc.ll
@@ -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:
diff --git a/llvm/test/CodeGen/AArch64/arm64-named-reg-notareg.ll b/llvm/test/CodeGen/AArch64/arm64-named-reg-notareg.ll
index fe5f000a393e7..8a5fd6f1ac8bd 100644
--- a/llvm/test/CodeGen/AArch64/arm64-named-reg-notareg.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-named-reg-notareg.ll
@@ -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:
diff --git a/llvm/test/CodeGen/AArch64/arm64-tls-dynamics.ll b/llvm/test/CodeGen/AArch64/arm64-tls-dynamics.ll
index c12730bd3b0d7..8ddcd0b93ea87 100644
--- a/llvm/test/CodeGen/AArch64/arm64-tls-dynamics.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-tls-dynamics.ll
@@ -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
diff --git a/llvm/test/CodeGen/AArch64/arm64-tls-initial-exec.ll b/llvm/test/CodeGen/AArch64/arm64-tls-initial-exec.ll
index c5a1144964976..437c169087c5b 100644
--- a/llvm/test/CodeGen/AArch64/arm64-tls-initial-exec.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-tls-initial-exec.ll
@@ -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
diff --git a/llvm/test/CodeGen/AArch64/fast-isel-sp-adjust.ll b/llvm/test/CodeGen/AArch64/fast-isel-sp-adjust.ll
index 22e3ccf2b1209..670b49f002be0 100644
--- a/llvm/test/CodeGen/AArch64/fast-isel-sp-adjust.ll
+++ b/llvm/test/CodeGen/AArch64/fast-isel-sp-adjust.ll
@@ -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
diff --git a/llvm/test/CodeGen/AArch64/hardened-br-jump-table.ll b/llvm/test/CodeGen/AArch64/hardened-br-jump-table.ll
index f20ea4db7baeb..80e1c6429cc25 100644
--- a/llvm/test/CodeGen/AArch64/hardened-br-jump-table.ll
+++ b/llvm/test/CodeGen/AArch64/hardened-br-jump-table.ll
@@ -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 \
diff --git a/llvm/test/CodeGen/AArch64/ptrauth-arm64-tls-dynamics.ll b/llvm/test/CodeGen/AArch64/ptrauth-arm64-tls-dynamics.ll
index 89731e62dcc1e..2d8085cf489b9 100644
--- a/llvm/test/CodeGen/AArch64/ptrauth-arm64-tls-dynamics.ll
+++ b/llvm/test/CodeGen/AArch64/ptrauth-arm64-tls-dynamics.ll
@@ -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
diff --git a/llvm/test/CodeGen/AArch64/ptrauth-constant-in-code.ll b/llvm/test/CodeGen/AArch64/ptrauth-constant-in-code.ll
index 76339a7cc5791..a323c0fd1ed33 100644
--- a/llvm/test/CodeGen/AArch64/ptrauth-constant-in-code.ll
+++ b/llvm/test/CodeGen/AArch64/ptrauth-constant-in-code.ll
@@ -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
@@ -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
@@ -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
@@ -44,9 +44,9 @@ define ptr @foo() {
;--- err4.ll
-; RUN: not --crash llc < err4.ll -mtriple aarch64-elf -mattr=+pauth \
+; RUN: not llc < err4.l...
[truncated]
|
@llvm/pr-subscribers-backend-aarch64 Author: Akshat Oke (optimisan) Changes
I reckon having default Patch is 311.05 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/128495.diff 387 Files Affected:
diff --git a/llvm/include/llvm/Support/ErrorHandling.h b/llvm/include/llvm/Support/ErrorHandling.h
index 9c8e3448f3a03..8dd2ba10648d3 100644
--- a/llvm/include/llvm/Support/ErrorHandling.h
+++ b/llvm/include/llvm/Support/ErrorHandling.h
@@ -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,
+ 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.
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll b/llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
index 29c320da6c0a7..c12853f919271 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
@@ -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.
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/call-translator-musttail.ll b/llvm/test/CodeGen/AArch64/GlobalISel/call-translator-musttail.ll
index 0894fbeb34a95..72af098a89469 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/call-translator-musttail.ll
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/call-translator-musttail.ll
@@ -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
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-1.mir b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-1.mir
index 9c318b7574b87..4879b8343ed59 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-1.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-1.mir
@@ -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 /
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-2.mir b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-2.mir
index bbdc54a512197..8e8e8b29c778f 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-2.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-inttoptr-xfail-2.mir
@@ -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 /
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/ptrauth-constant-in-code.ll b/llvm/test/CodeGen/AArch64/GlobalISel/ptrauth-constant-in-code.ll
index 12a3448111fcb..2491af1ea23fd 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/ptrauth-constant-in-code.ll
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/ptrauth-constant-in-code.ll
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
diff --git a/llvm/test/CodeGen/AArch64/arm64-darwin-cc.ll b/llvm/test/CodeGen/AArch64/arm64-darwin-cc.ll
index 9e18f778d1c46..0f526dad5bd83 100644
--- a/llvm/test/CodeGen/AArch64/arm64-darwin-cc.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-darwin-cc.ll
@@ -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
diff --git a/llvm/test/CodeGen/AArch64/arm64-named-reg-alloc.ll b/llvm/test/CodeGen/AArch64/arm64-named-reg-alloc.ll
index bd14ec61b55cc..5d48c17e12862 100644
--- a/llvm/test/CodeGen/AArch64/arm64-named-reg-alloc.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-named-reg-alloc.ll
@@ -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:
diff --git a/llvm/test/CodeGen/AArch64/arm64-named-reg-notareg.ll b/llvm/test/CodeGen/AArch64/arm64-named-reg-notareg.ll
index fe5f000a393e7..8a5fd6f1ac8bd 100644
--- a/llvm/test/CodeGen/AArch64/arm64-named-reg-notareg.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-named-reg-notareg.ll
@@ -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:
diff --git a/llvm/test/CodeGen/AArch64/arm64-tls-dynamics.ll b/llvm/test/CodeGen/AArch64/arm64-tls-dynamics.ll
index c12730bd3b0d7..8ddcd0b93ea87 100644
--- a/llvm/test/CodeGen/AArch64/arm64-tls-dynamics.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-tls-dynamics.ll
@@ -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
diff --git a/llvm/test/CodeGen/AArch64/arm64-tls-initial-exec.ll b/llvm/test/CodeGen/AArch64/arm64-tls-initial-exec.ll
index c5a1144964976..437c169087c5b 100644
--- a/llvm/test/CodeGen/AArch64/arm64-tls-initial-exec.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-tls-initial-exec.ll
@@ -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
diff --git a/llvm/test/CodeGen/AArch64/fast-isel-sp-adjust.ll b/llvm/test/CodeGen/AArch64/fast-isel-sp-adjust.ll
index 22e3ccf2b1209..670b49f002be0 100644
--- a/llvm/test/CodeGen/AArch64/fast-isel-sp-adjust.ll
+++ b/llvm/test/CodeGen/AArch64/fast-isel-sp-adjust.ll
@@ -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
diff --git a/llvm/test/CodeGen/AArch64/hardened-br-jump-table.ll b/llvm/test/CodeGen/AArch64/hardened-br-jump-table.ll
index f20ea4db7baeb..80e1c6429cc25 100644
--- a/llvm/test/CodeGen/AArch64/hardened-br-jump-table.ll
+++ b/llvm/test/CodeGen/AArch64/hardened-br-jump-table.ll
@@ -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 \
diff --git a/llvm/test/CodeGen/AArch64/ptrauth-arm64-tls-dynamics.ll b/llvm/test/CodeGen/AArch64/ptrauth-arm64-tls-dynamics.ll
index 89731e62dcc1e..2d8085cf489b9 100644
--- a/llvm/test/CodeGen/AArch64/ptrauth-arm64-tls-dynamics.ll
+++ b/llvm/test/CodeGen/AArch64/ptrauth-arm64-tls-dynamics.ll
@@ -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
diff --git a/llvm/test/CodeGen/AArch64/ptrauth-constant-in-code.ll b/llvm/test/CodeGen/AArch64/ptrauth-constant-in-code.ll
index 76339a7cc5791..a323c0fd1ed33 100644
--- a/llvm/test/CodeGen/AArch64/ptrauth-constant-in-code.ll
+++ b/llvm/test/CodeGen/AArch64/ptrauth-constant-in-code.ll
@@ -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
@@ -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
@@ -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
@@ -44,9 +44,9 @@ define ptr @foo() {
;--- err4.ll
-; RUN: not --crash llc < err4.ll -mtriple aarch64-elf -mattr=+pauth \
+; RUN: not llc < err4.l...
[truncated]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for doing this! This was a truly horrible default (and I would argue this should not even be an option). report_fatal_error is not an assertion and should be a clean exit
/// handler. | ||
void install_bad_alloc_error_handler(fatal_error_handler_t handler, | ||
void *user_data = nullptr); | ||
[[noreturn]] void report_fatal_error(const char *reason, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Given that there was Discourse thread on this topic about a year and a half ago, please draw attention to this PR on there, once you're happy for people to look at it. |
Marking as draft; I should have read the RFC beforehand |
report_fatal_error
is being used to report invalid inputs but the default reporting is a crash.I reckon having default
GenCrashDiag = true
makes more sense forreport_bad_alloc_error
instead.