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() {
309309}
310310#endif
311311
312+ #if SWIFT_BACKTRACE_ON_CRASH_SUPPORTED
312313#if _WIN32
313314bool writeProtectMemory (void *ptr, size_t size) {
314315 return !!VirtualProtect (ptr, size, PAGE_READONLY, NULL );
@@ -318,6 +319,7 @@ bool writeProtectMemory(void *ptr, size_t size) {
318319 return mprotect (ptr, size, PROT_READ) == 0 ;
319320}
320321#endif
322+ #endif
321323
322324} // namespace
323325
@@ -1061,6 +1063,7 @@ _swift_backtrace_demangle(const char *mangledName,
10611063 return nullptr ;
10621064}
10631065
1066+ #if SWIFT_BACKTRACE_ON_CRASH_SUPPORTED
10641067namespace {
10651068
10661069char addr_buf[18 ];
@@ -1117,6 +1120,7 @@ trueOrFalse(OnOffTty oot) {
11171120}
11181121
11191122} // namespace
1123+ #endif
11201124
11211125// N.B. THIS FUNCTION MUST BE SAFE TO USE FROM A CRASH HANDLER. On Linux
11221126// 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