Skip to content

Make sure functions defined in a header are inline. #41901

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions include/swift/Runtime/DispatchShims.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

// Provide wrappers with runtime checks to make sure that the dispatch functions
// are only called on OS-es where they are supported
dispatch_thread_override_info_s
static inline dispatch_thread_override_info_s
swift_dispatch_thread_get_current_override_qos_floor()
{
if (__builtin_available(macOS 9998, iOS 9998, tvOS 9998, watchOS 9998, *)) {
Expand All @@ -30,7 +30,7 @@ swift_dispatch_thread_get_current_override_qos_floor()
return (dispatch_thread_override_info_s) {0};
}

int
static inline int
swift_dispatch_thread_override_self(qos_class_t override_qos) {

if (__builtin_available(macOS 9998, iOS 9998, tvOS 9998, watchOS 9998, *)) {
Expand All @@ -40,7 +40,7 @@ swift_dispatch_thread_override_self(qos_class_t override_qos) {
return 0;
}

int
static inline int
swift_dispatch_lock_override_start_with_debounce(dispatch_lock_t *lock_addr,
dispatch_tid_t expected_thread, qos_class_t override_to_apply) {

Expand All @@ -51,7 +51,7 @@ swift_dispatch_lock_override_start_with_debounce(dispatch_lock_t *lock_addr,
return 0;
}

int
static inline int
swift_dispatch_lock_override_end(qos_class_t override_to_end) {
if (__builtin_available(macOS 9998, iOS 9998, tvOS 9998, watchOS 9998, *)) {
return dispatch_lock_override_end(override_to_end);
Expand Down