mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Use LLVM_* attributes in the runtime
This commit is contained in:
@@ -27,6 +27,9 @@
|
|||||||
#include "swift/Runtime/Metadata.h"
|
#include "swift/Runtime/Metadata.h"
|
||||||
#include "swift/Runtime/HeapObject.h"
|
#include "swift/Runtime/HeapObject.h"
|
||||||
#include "SwiftHashableSupport.h"
|
#include "SwiftHashableSupport.h"
|
||||||
|
|
||||||
|
#include "llvm/Support/Compiler.h"
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#if SWIFT_OBJC_INTEROP
|
#if SWIFT_OBJC_INTEROP
|
||||||
# include <CoreFoundation/CoreFoundation.h>
|
# include <CoreFoundation/CoreFoundation.h>
|
||||||
@@ -205,9 +208,8 @@ SWIFT_RUNTIME_EXPORT
|
|||||||
void swift_errorInMain(SwiftError *object);
|
void swift_errorInMain(SwiftError *object);
|
||||||
SWIFT_RUNTIME_EXPORT
|
SWIFT_RUNTIME_EXPORT
|
||||||
void swift_willThrow(SwiftError *object);
|
void swift_willThrow(SwiftError *object);
|
||||||
SWIFT_RUNTIME_EXPORT
|
SWIFT_RUNTIME_EXPORT LLVM_ATTRIBUTE_NORETURN
|
||||||
void swift_unexpectedError(SwiftError *object)
|
void swift_unexpectedError(SwiftError *object);
|
||||||
__attribute__((__noreturn__));
|
|
||||||
|
|
||||||
#if SWIFT_OBJC_INTEROP
|
#if SWIFT_OBJC_INTEROP
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
#include "swift/Runtime/Heap.h"
|
#include "swift/Runtime/Heap.h"
|
||||||
#include "swift/Runtime/Metadata.h"
|
#include "swift/Runtime/Metadata.h"
|
||||||
#include "swift/ABI/System.h"
|
#include "swift/ABI/System.h"
|
||||||
|
#include "llvm/Support/Compiler.h"
|
||||||
#include "llvm/Support/MathExtras.h"
|
#include "llvm/Support/MathExtras.h"
|
||||||
#include "MetadataCache.h"
|
#include "MetadataCache.h"
|
||||||
#include "Private.h"
|
#include "Private.h"
|
||||||
@@ -187,9 +188,8 @@ OpaqueValue *swift::swift_projectBox(HeapObject *o) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Forward-declare this, but define it after swift_release.
|
// Forward-declare this, but define it after swift_release.
|
||||||
extern "C" LLVM_LIBRARY_VISIBILITY void
|
extern "C" LLVM_LIBRARY_VISIBILITY LLVM_ATTRIBUTE_NOINLINE LLVM_ATTRIBUTE_USED void
|
||||||
_swift_release_dealloc(HeapObject *object) SWIFT_CC(RegisterPreservingCC_IMPL)
|
_swift_release_dealloc(HeapObject *object) SWIFT_CC(RegisterPreservingCC_IMPL);
|
||||||
__attribute__((__noinline__, __used__));
|
|
||||||
|
|
||||||
void swift::swift_retain(HeapObject *object)
|
void swift::swift_retain(HeapObject *object)
|
||||||
SWIFT_CC(RegisterPreservingCC_IMPL) {
|
SWIFT_CC(RegisterPreservingCC_IMPL) {
|
||||||
|
|||||||
@@ -23,22 +23,20 @@
|
|||||||
|
|
||||||
#include "../SwiftShims/Visibility.h"
|
#include "../SwiftShims/Visibility.h"
|
||||||
|
|
||||||
|
#include "llvm/Support/Compiler.h"
|
||||||
|
|
||||||
namespace swift {
|
namespace swift {
|
||||||
struct HeapObject;
|
struct HeapObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIFT_RUNTIME_EXPORT
|
SWIFT_RUNTIME_EXPORT LLVM_ATTRIBUTE_NOINLINE LLVM_ATTRIBUTE_USED
|
||||||
void swift_leaks_startTrackingObjects(const char *)
|
void swift_leaks_startTrackingObjects(const char *);
|
||||||
__attribute__((__noinline__, __used__));
|
SWIFT_RUNTIME_EXPORT LLVM_ATTRIBUTE_NOINLINE LLVM_ATTRIBUTE_USED
|
||||||
SWIFT_RUNTIME_EXPORT
|
int swift_leaks_stopTrackingObjects(const char *);
|
||||||
int swift_leaks_stopTrackingObjects(const char *)
|
SWIFT_RUNTIME_EXPORT LLVM_ATTRIBUTE_NOINLINE LLVM_ATTRIBUTE_USED
|
||||||
__attribute__((__noinline__, __used__));
|
void swift_leaks_startTrackingObject(swift::HeapObject *);
|
||||||
SWIFT_RUNTIME_EXPORT
|
SWIFT_RUNTIME_EXPORT LLVM_ATTRIBUTE_NOINLINE LLVM_ATTRIBUTE_USED
|
||||||
void swift_leaks_startTrackingObject(swift::HeapObject *)
|
void swift_leaks_stopTrackingObject(swift::HeapObject *);
|
||||||
__attribute__((__noinline__, __used__));
|
|
||||||
SWIFT_RUNTIME_EXPORT
|
|
||||||
void swift_leaks_stopTrackingObject(swift::HeapObject *)
|
|
||||||
__attribute__((__noinline__, __used__));
|
|
||||||
|
|
||||||
#define SWIFT_LEAKS_START_TRACKING_OBJECT(obj) \
|
#define SWIFT_LEAKS_START_TRACKING_OBJECT(obj) \
|
||||||
swift_leaks_startTrackingObject(obj)
|
swift_leaks_startTrackingObject(obj)
|
||||||
|
|||||||
Reference in New Issue
Block a user