Add fast/basic alloc/dealloc APIs

Swift SVN r1908
This commit is contained in:
Dave Zarzycki
2012-05-21 17:08:54 +00:00
parent 72ebeee76f
commit 94e67cc4e9
3 changed files with 283 additions and 15 deletions

View File

@@ -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;
}