mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
On Linux, make swift_reportError always print backtraces (#10638)
On Linux, make swift_reportError always print backtraces.
This commit is contained in:
committed by
GitHub
parent
d44cdf465a
commit
150696f8f6
@@ -265,7 +265,7 @@ void swift::reportToDebugger(uintptr_t flags, const char *message,
|
||||
/// Does not crash by itself.
|
||||
void swift::swift_reportError(uint32_t flags,
|
||||
const char *message) {
|
||||
#if NDEBUG
|
||||
#if defined(__APPLE__) && NDEBUG
|
||||
flags &= ~FatalErrorFlags::ReportBacktrace;
|
||||
#endif
|
||||
reportNow(flags, message);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
// UNSUPPORTED: OS=watchos
|
||||
// UNSUPPORTED: OS=ios
|
||||
// UNSUPPORTED: OS=tvos
|
||||
// REQUIRES: OS=macosx
|
||||
// REQUIRES: swift_stdlib_no_asserts
|
||||
// REQUIRES: executable_test
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
// UNSUPPORTED: OS=watchos
|
||||
// UNSUPPORTED: OS=ios
|
||||
// UNSUPPORTED: OS=tvos
|
||||
// REQUIRES: OS=macosx
|
||||
// REQUIRES: swift_stdlib_no_asserts
|
||||
// REQUIRES: executable_test
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
// Backtraces are not emitted when optimizations are enabled. This test can not
|
||||
// run when optimizations are enabled.
|
||||
// REQUIRES: swift_test_mode_optimize_none
|
||||
// REQUIRES: swift_stdlib_asserts
|
||||
|
||||
func funcB() {
|
||||
fatalError("linux-fatal-backtrace");
|
||||
|
||||
Reference in New Issue
Block a user