Skip to content

Commit 7c8523c

Browse files
committed
Use "transparent_stepping" attribute in C++ compiler generated interop
Use transparent_stepping instead of nodebug and alwaysinline in compiler generated C++ code from Swift. This attribute allow for annotated functions to be used in expression evaluation, which is an advantage over the former two.
1 parent 47bf147 commit 7c8523c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/PrintAsClang/_SwiftCxxInteroperability.h

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

31-
#if __has_attribute(always_inline) && __has_attribute(nodebug)
31+
#if __has_attribute(transparent_stepping)
3232
#define SWIFT_INLINE_THUNK_ATTRIBUTES \
33-
__attribute__((always_inline)) __attribute__((nodebug))
33+
__attribute__((transparent_stepping))
3434
#if defined(DEBUG) && __has_attribute(used)
3535
// Additional 'used' attribute is used in debug mode to make inline thunks
3636
// accessible to LLDB.

0 commit comments

Comments
 (0)