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
19
19
20
20
internal import BacktracingImpl. Runtime
21
21
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
-
27
22
typealias CrashInfo = swift . runtime . backtrace . CrashInfo
28
23
typealias memserver_req = swift . runtime . backtrace . memserver_req
29
24
typealias memserver_resp = swift . runtime . backtrace . memserver_resp
Original file line number Diff line number Diff line change 23
23
#include " swift/Runtime/CrashInfo.h"
24
24
25
25
#ifdef __cplusplus
26
- namespace swift {
27
- namespace runtime {
26
+ #define EXTERN_C extern " C"
27
+ #else
28
+ #define EXTERN_C
28
29
#endif
29
30
30
31
// 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);
32
33
33
34
// 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);
35
36
36
37
// 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);
46
42
47
43
#endif // SWIFT_BACKTRACING_RUNTIME_H
You can’t perform that action at this time.
0 commit comments