mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Rename some macros based on the PR review comments.
- use the SWIFT prefix for all macros - make names of some macros shorter
This commit is contained in:
@@ -22,17 +22,17 @@
|
||||
|
||||
using namespace swift;
|
||||
|
||||
RT_ENTRY_VISIBILITY
|
||||
SWIFT_RT_ENTRY_VISIBILITY
|
||||
void *swift::swift_slowAlloc(size_t size, size_t alignMask)
|
||||
CALLING_CONVENTION(RegisterPreservingCC_IMPL) {
|
||||
SWIFT_CC(RegisterPreservingCC_IMPL) {
|
||||
// FIXME: use posix_memalign if alignMask is larger than the system guarantee.
|
||||
void *p = malloc(size);
|
||||
if (!p) swift::crash("Could not allocate memory.");
|
||||
return p;
|
||||
}
|
||||
|
||||
RT_ENTRY_VISIBILITY
|
||||
SWIFT_RT_ENTRY_VISIBILITY
|
||||
void swift::swift_slowDealloc(void *ptr, size_t bytes, size_t alignMask)
|
||||
CALLING_CONVENTION(RegisterPreservingCC_IMPL) {
|
||||
SWIFT_CC(RegisterPreservingCC_IMPL) {
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user