mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The general rule here is that something needs to be SWIFT_CC(swift) if it's just declared in Swift code using _silgen_name, as opposed to importing something via a header. Of course, SWIFT_CC(swift) expands to nothing by default for now, and I haven't made an effort yet to add the indirect-result / context parameter ABI attributes. This is just a best-effort first pass. I also took the opportunity to shift a few files to just implement their shims header and to demote a few things to be private stdlib interfaces.
33 lines
984 B
Plaintext
33 lines
984 B
Plaintext
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See http://swift.org/LICENSE.txt for license information
|
|
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include <objc/objc-api.h>
|
|
|
|
#include "swift/Runtime/Config.h"
|
|
|
|
OBJC_EXPORT
|
|
void *objc_autoreleasePoolPush(void);
|
|
|
|
OBJC_EXPORT
|
|
void objc_autoreleasePoolPop(void *);
|
|
|
|
SWIFT_CC(swift) SWIFT_RUNTIME_STDLIB_INTERFACE
|
|
extern "C" void *_swift_objc_autoreleasePoolPush(void) {
|
|
return objc_autoreleasePoolPush();
|
|
}
|
|
|
|
SWIFT_CC(swift) SWIFT_RUNTIME_STDLIB_INTERFACE
|
|
extern "C" void _swift_objc_autoreleasePoolPop(void *context) {
|
|
return objc_autoreleasePoolPop(context);
|
|
}
|
|
|