mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Sema: Lift restriction on @objc categories of concrete subclasses of generic classes
In-place initialization means the class has a symbol we can reference from the category, so there's nothing to do on the IRGen side. For JIT mode, we just need to realize the class metadata by calling an accessor instead of directly referencing the symbol though.
This commit is contained in:
@@ -409,9 +409,6 @@ llvm::Constant *irgen::tryEmitConstantHeapMetadataRef(IRGenModule &IGM,
|
||||
|
||||
// If the class must not require dynamic initialization --- e.g. if it
|
||||
// is a super reference --- then respect everything that might impose that.
|
||||
//
|
||||
// FIXME: This should only care about relocation, not initialization, so
|
||||
// that we can emit categories for concrete subclasses of generic classes.
|
||||
if (!allowDynamicUninitialized) {
|
||||
if (doesClassMetadataRequireInitialization(IGM, theDecl))
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user