Skip to content

Commit bc1a2da

Browse files
authored
Merge pull request #65046 from augusto2112/cherry-pick-add-nodebug-again
Reintroduce alwaysinline and nodebug as fallbacks to SWIFT_INLINE_THU…
2 parents 993046e + 86c151b commit bc1a2da

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

lib/PrintAsClang/_SwiftCxxInteroperability.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,23 @@
2828
# define SWIFT_CALL __attribute__((swiftcall))
2929
#endif
3030

31-
#if __has_attribute(always_inline) && __has_attribute(nodebug)
31+
#if __has_attribute(transparent_stepping)
32+
#define SWIFT_INLINE_THUNK_ATTRIBUTES \
33+
__attribute__((transparent_stepping))
34+
#elif __has_attribute(always_inline) && __has_attribute(nodebug)
3235
#define SWIFT_INLINE_THUNK_ATTRIBUTES \
3336
__attribute__((always_inline)) __attribute__((nodebug))
37+
#else
38+
#define SWIFT_INLINE_THUNK_ATTRIBUTES
39+
#endif
40+
3441
#if defined(DEBUG) && __has_attribute(used)
3542
// Additional 'used' attribute is used in debug mode to make inline thunks
3643
// accessible to LLDB.
3744
#define SWIFT_INLINE_THUNK_USED_ATTRIBUTE __attribute__((used))
3845
#else
3946
#define SWIFT_INLINE_THUNK_USED_ATTRIBUTE
4047
#endif
41-
#else
42-
#define SWIFT_INLINE_THUNK_ATTRIBUTES
43-
#define SWIFT_INLINE_THUNK_USED_ATTRIBUTE
44-
#endif
4548

4649
/// The `SWIFT_INLINE_THUNK` macro is applied on the inline function thunks in
4750
/// the header that represents a C/C++ Swift module interface generated by the

0 commit comments

Comments
 (0)