Skip to content

[shims] ensure that _SwiftConcurrency has the same Swift interface re… #64705

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 29, 2023
Merged
Show file tree
Hide file tree
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
11 changes: 7 additions & 4 deletions stdlib/public/SwiftShims/swift/shims/_SwiftConcurrency.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ typedef struct _SwiftContext {
struct _SwiftContext *parentContext;
} _SwiftContext;

void exit(int);

#define EXIT_SUCCESS 0

#ifdef __cplusplus
} // extern "C"
} // namespace swift
#endif

#ifdef __cplusplus
extern "C" [[noreturn]]
#endif
void exit(int);

#define EXIT_SUCCESS 0

#endif // SWIFT_CONCURRENCY_H
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// RUN: %target-swift-ide-test -print-module -module-to-print=_SwiftConcurrencyShims -source-filename=x -enable-experimental-cxx-interop | %FileCheck %s
// RUN: %target-swift-ide-test -print-module -module-to-print=_SwiftConcurrencyShims -source-filename=x | %FileCheck %s

// REQUIRES: concurrency

// Ensure that _SwiftConcurrencyShims defines the same `exit` regardless of whether
// C++ interoperability is enabled.

// CHECK: func exit(_: Int32) -> Never
// CHECK: var EXIT_SUCCESS: Int32 { get }