mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Ensure that the functions which are declared with @_silgen_name for importing from external libraries are described with the correct linkage. If the declared functions are marked with internal or no linkage, the declaration for the import will be given internal linkage. However, this is incorrect if the definition is not part of the image. The remaining uses were filtered on the assumption that the swift standard library is statically linked and provides the definitions for those symbols and thus will be part of the image. This was noticed by manual inspection of the IR generated. Thanks to Dmitri Gribenko for the hint about the trampoline construction.
29 lines
855 B
Plaintext
29 lines
855 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>
|
|
|
|
OBJC_EXPORT
|
|
void *objc_autoreleasePoolPush(void);
|
|
|
|
OBJC_EXPORT
|
|
void objc_autoreleasePoolPop(void *);
|
|
|
|
extern "C" void *_swift_objc_autoreleasePoolPush(void) {
|
|
return objc_autoreleasePoolPush();
|
|
}
|
|
|
|
extern "C" void _swift_objc_autoreleasePoolPop(void *context) {
|
|
return objc_autoreleasePoolPop(context);
|
|
}
|
|
|