File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -309,6 +309,7 @@ bool isPrivileged() {
309
309
}
310
310
#endif
311
311
312
+ #if SWIFT_BACKTRACE_ON_CRASH_SUPPORTED
312
313
#if _WIN32
313
314
bool writeProtectMemory (void *ptr, size_t size) {
314
315
return !!VirtualProtect (ptr, size, PAGE_READONLY, NULL );
@@ -318,6 +319,7 @@ bool writeProtectMemory(void *ptr, size_t size) {
318
319
return mprotect (ptr, size, PROT_READ) == 0 ;
319
320
}
320
321
#endif
322
+ #endif
321
323
322
324
} // namespace
323
325
@@ -1061,6 +1063,7 @@ _swift_backtrace_demangle(const char *mangledName,
1061
1063
return nullptr ;
1062
1064
}
1063
1065
1066
+ #if SWIFT_BACKTRACE_ON_CRASH_SUPPORTED
1064
1067
namespace {
1065
1068
1066
1069
char addr_buf[18 ];
@@ -1117,6 +1120,7 @@ trueOrFalse(OnOffTty oot) {
1117
1120
}
1118
1121
1119
1122
} // namespace
1123
+ #endif
1120
1124
1121
1125
// N.B. THIS FUNCTION MUST BE SAFE TO USE FROM A CRASH HANDLER. On Linux
1122
1126
// and macOS, that means it must be async-signal-safe. On Windows, there
You can’t perform that action at this time.
0 commit comments