mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
IRGen: Fix type of initing ctor, destroying dtor
IRGen was generating the exact same signature for the initializing/allocating constructors and destroying/deallocating destructors. Make it do the right thing by typing the initializing constructor as Swift T -> (...) -> T and the destroying destructor as LLVM void(%swift.refcounted*). (This will later change to '%swift.refcounted*(%swift.refcounted*)' pending some irgen/runtime cleanup.) Swift SVN r3837
This commit is contained in:
@@ -102,8 +102,9 @@ IRGenModule::IRGenModule(ASTContext &Context,
|
||||
TypeMetadataPatternPtrTy =
|
||||
TypeMetadataPatternStructTy->getPointerTo(defaultAS);
|
||||
|
||||
DtorTy = llvm::FunctionType::get(SizeTy, RefCountedPtrTy, false);
|
||||
llvm::Type *dtorPtrTy = DtorTy->getPointerTo();
|
||||
DeallocatingDtorTy = llvm::FunctionType::get(SizeTy, RefCountedPtrTy, false);
|
||||
DestroyingDtorTy = llvm::FunctionType::get(VoidTy, RefCountedPtrTy, false);
|
||||
llvm::Type *dtorPtrTy = DeallocatingDtorTy->getPointerTo();
|
||||
|
||||
// A full heap metadata is basically just an additional small prefix
|
||||
// on a full metadata, used for metadata corresponding to heap
|
||||
|
||||
Reference in New Issue
Block a user