mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add Builtin.ObjCPointer with accompanying IR-gen support and
wrap it in an 'id' type in the standard library. Also fix a bug noticed by inspection where initWithTake for function types wasn't entering a cleanup for the taken value. This probably doesn't matter for existing possibilities, but it's potentially important under exceptions. Swift SVN r1902
This commit is contained in:
@@ -56,6 +56,8 @@ IRGenModule::IRGenModule(ASTContext &Context,
|
||||
ReleaseFn = nullptr;
|
||||
DeallocFn = nullptr;
|
||||
DeallocRawFn = nullptr;
|
||||
ObjCRetainFn = nullptr;
|
||||
ObjCReleaseFn = nullptr;
|
||||
|
||||
RefCountedStructTy =
|
||||
llvm::StructType::create(getLLVMContext(), "swift.refcounted");
|
||||
@@ -83,6 +85,9 @@ IRGenModule::IRGenModule(ASTContext &Context,
|
||||
FixedBufferTy = nullptr;
|
||||
for (unsigned i = 0; i != NumValueWitnesses; ++i)
|
||||
ValueWitnessTys[i] = nullptr;
|
||||
|
||||
ObjCPtrTy = llvm::StructType::create(getLLVMContext(), "objc_object")
|
||||
->getPointerTo(0);
|
||||
}
|
||||
|
||||
IRGenModule::~IRGenModule() {
|
||||
|
||||
Reference in New Issue
Block a user