mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add fast/basic alloc/dealloc APIs
Swift SVN r1908
This commit is contained in:
@@ -106,7 +106,7 @@ llvm::Constant *IRGenModule::getAllocFn() {
|
||||
llvm::Type *types[] = { HeapMetadataPtrTy, SizeTy, SizeTy };
|
||||
llvm::FunctionType *fnType =
|
||||
llvm::FunctionType::get(RefCountedPtrTy, types, false);
|
||||
AllocFn = Module.getOrInsertFunction("swift_alloc", fnType);
|
||||
AllocFn = Module.getOrInsertFunction("swift_allocObject", fnType);
|
||||
return AllocFn;
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ llvm::Constant *IRGenModule::getDeallocFn() {
|
||||
|
||||
llvm::FunctionType *fnType =
|
||||
llvm::FunctionType::get(VoidTy, RefCountedPtrTy, false);
|
||||
DeallocFn = Module.getOrInsertFunction("swift_dealloc", fnType);
|
||||
DeallocFn = Module.getOrInsertFunction("swift_deallocObject", fnType);
|
||||
return DeallocFn;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user