On Linux, make swift_reportError always print backtraces (#10638)

On Linux, make swift_reportError always print backtraces.
This commit is contained in:
Kuba (Brecka) Mracek
2017-06-27 21:53:55 -07:00
committed by GitHub
parent d44cdf465a
commit 150696f8f6
4 changed files with 3 additions and 2 deletions

View File

@@ -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);

View File

@@ -6,6 +6,7 @@
// UNSUPPORTED: OS=watchos
// UNSUPPORTED: OS=ios
// UNSUPPORTED: OS=tvos
// REQUIRES: OS=macosx
// REQUIRES: swift_stdlib_no_asserts
// REQUIRES: executable_test

View File

@@ -6,6 +6,7 @@
// UNSUPPORTED: OS=watchos
// UNSUPPORTED: OS=ios
// UNSUPPORTED: OS=tvos
// REQUIRES: OS=macosx
// REQUIRES: swift_stdlib_no_asserts
// REQUIRES: executable_test

View File

@@ -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");