Skip to content

Commit 967bd05

Browse files
authored
Merge pull request #64908 from augusto2112/add-nodebug-again
Reintroduce alwaysinline and nodebug as fallbacks to SWIFT_INLINE_THU…
2 parents ff5c531 + cfb3e5a commit 967bd05

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
@@ -30,18 +30,21 @@
3030

3131
#if __has_attribute(transparent_stepping)
3232
#define SWIFT_INLINE_THUNK_ATTRIBUTES \
33-
__attribute__((transparent_stepping))
33+
__attribute__((transparent_stepping))
34+
#elif __has_attribute(always_inline) && __has_attribute(nodebug)
35+
#define SWIFT_INLINE_THUNK_ATTRIBUTES \
36+
__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)