File tree Expand file tree Collapse file tree 2 files changed +9
-18
lines changed
stdlib/public/Backtracing Expand file tree Collapse file tree 2 files changed +9
-18
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,6 @@ import Swift
1919
2020internal import BacktracingImpl. Runtime
2121
22- let swift_reportWarning = swift. runtime. swift_reportWarning
23- let _swift_backtrace_isThunkFunction
24- = swift. runtime. _swift_backtrace_isThunkFunction
25- let _swift_backtrace_demangle = swift. runtime. _swift_backtrace_demangle
26-
2722typealias CrashInfo = swift . runtime . backtrace . CrashInfo
2823typealias memserver_req = swift . runtime . backtrace . memserver_req
2924typealias memserver_resp = swift . runtime . backtrace . memserver_resp
Original file line number Diff line number Diff line change 2323#include " swift/Runtime/CrashInfo.h"
2424
2525#ifdef __cplusplus
26- namespace swift {
27- namespace runtime {
26+ #define EXTERN_C extern " C"
27+ #else
28+ #define EXTERN_C
2829#endif
2930
3031// Can't import swift/Runtime/Debug.h because it assumes C++
31- void swift_reportWarning (uint32_t flags, const char *message);
32+ EXTERN_C void swift_reportWarning (uint32_t flags, const char *message);
3233
3334// Returns true if the given function is a thunk function
34- bool _swift_backtrace_isThunkFunction (const char *rawName);
35+ EXTERN_C bool _swift_backtrace_isThunkFunction (const char *rawName);
3536
3637// Demangle the given raw name (supports Swift and C++)
37- char *_swift_backtrace_demangle (const char *rawName,
38- size_t rawNameLength,
39- char *outputBuffer,
40- size_t *outputBufferSize);
41-
42- #ifdef __cplusplus
43- } // namespace runtime
44- } // namespace swift
45- #endif
38+ EXTERN_C char *_swift_backtrace_demangle (const char *rawName,
39+ size_t rawNameLength,
40+ char *outputBuffer,
41+ size_t *outputBufferSize);
4642
4743#endif // SWIFT_BACKTRACING_RUNTIME_H
You can’t perform that action at this time.
0 commit comments