Skip to content

Commit e6806ab

Browse files
committed
[interop][SwiftToCxx] NFC, adopt SWIFT_INLINE_THUNK in the stdlib overlay
1 parent bd63679 commit e6806ab

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/PrintAsClang/_SwiftStdlibCxxOverlay.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,24 @@ template <class Collection, class T> class CollectionIterator {
4747
using Index =
4848
decltype(reinterpret_cast<Collection *>(0x123)->getStartIndex());
4949

50-
inline CollectionIterator(const Collection &collection)
50+
SWIFT_INLINE_THUNK CollectionIterator(const Collection &collection)
5151
: collection(collection) {
5252
index = collection.getStartIndex();
5353
endIndex = collection.getEndIndex();
5454
// FIXME: Begin read access.
5555
}
5656

57-
inline ~CollectionIterator() {
57+
SWIFT_INLINE_THUNK ~CollectionIterator() {
5858
// FIXME: End read access.
5959
}
6060

61-
inline T operator*() const { return collection[index]; }
62-
inline void operator++() {
61+
SWIFT_INLINE_THUNK T operator*() const { return collection[index]; }
62+
SWIFT_INLINE_THUNK void operator++() {
6363
++index;
6464
// FIXME: assert(index <= endIndex); // No need to go past the end.
6565
}
6666

67-
inline bool operator!=(const IterationEndSentinel &) const {
67+
SWIFT_INLINE_THUNK bool operator!=(const IterationEndSentinel &) const {
6868
return index != endIndex;
6969
}
7070

@@ -81,13 +81,13 @@ template <class T> using ArrayIterator = CollectionIterator<Array<T>, T>;
8181

8282
// FIXME: This should apply to more than the Array type.
8383
template <class T>
84-
inline cxxOverlay::ArrayIterator<T> begin(const Array<T> &array
84+
SWIFT_INLINE_THUNK cxxOverlay::ArrayIterator<T> begin(const Array<T> &array
8585
[[clang::lifetimebound]]) {
8686
return cxxOverlay::ArrayIterator<T>(array);
8787
}
8888

8989
template <class T>
90-
inline cxxOverlay::IterationEndSentinel end(const Array<T> &) {
90+
SWIFT_INLINE_THUNK cxxOverlay::IterationEndSentinel end(const Array<T> &) {
9191
return {};
9292
}
9393

0 commit comments

Comments
 (0)