Skip to content
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 }