@@ -2880,24 +2880,19 @@ void irgen::emitClassMetadata(IRGenModule &IGM, ClassDecl *classDecl,
2880
2880
2881
2881
CanType declaredType = classDecl->getDeclaredType ()->getCanonicalType ();
2882
2882
2883
- // For now, all type metadata is directly stored.
2884
- bool isIndirect = false ;
2885
-
2886
2883
StringRef section{};
2887
2884
if (classDecl->isObjC () &&
2888
2885
IGM.TargetInfo .OutputObjectFormat == llvm::Triple::MachO)
2889
2886
section = " __DATA,__objc_data, regular" ;
2890
2887
2891
- auto var = IGM.defineTypeMetadata (declaredType, isIndirect, isGeneric,
2892
- canBeConstant,
2893
- init.finishAndCreateFuture (),
2894
- section);
2888
+ auto var = IGM.defineTypeMetadata (declaredType, isGeneric, canBeConstant,
2889
+ init.finishAndCreateFuture (), section);
2895
2890
2896
2891
// Add classes that don't require dynamic initialization to the
2897
2892
// ObjC class list.
2898
2893
//
2899
2894
// FIXME: This is where we check the completely fragile layout.
2900
- if (IGM.ObjCInterop && !isGeneric && !isIndirect &&
2895
+ if (IGM.ObjCInterop && !isGeneric &&
2901
2896
!doesClassMetadataRequireInitialization (IGM, classDecl)) {
2902
2897
// Emit the ObjC class symbol to make the class visible to ObjC.
2903
2898
if (classDecl->isObjC ()) {
@@ -3289,11 +3284,8 @@ void irgen::emitStructMetadata(IRGenModule &IGM, StructDecl *structDecl) {
3289
3284
3290
3285
CanType declaredType = structDecl->getDeclaredType ()->getCanonicalType ();
3291
3286
3292
- // For now, all type metadata is directly stored.
3293
- bool isIndirect = false ;
3294
-
3295
- IGM.defineTypeMetadata (declaredType, isIndirect, isPattern,
3296
- canBeConstant, init.finishAndCreateFuture ());
3287
+ IGM.defineTypeMetadata (declaredType, isPattern, canBeConstant,
3288
+ init.finishAndCreateFuture ());
3297
3289
3298
3290
IGM.IRGen .noteUseOfAnyParentTypeMetadata (structDecl);
3299
3291
}
@@ -3487,11 +3479,8 @@ void irgen::emitEnumMetadata(IRGenModule &IGM, EnumDecl *theEnum) {
3487
3479
3488
3480
CanType declaredType = theEnum->getDeclaredType ()->getCanonicalType ();
3489
3481
3490
- // For now, all type metadata is directly stored.
3491
- bool isIndirect = false ;
3492
-
3493
- IGM.defineTypeMetadata (declaredType, isIndirect, isPattern,
3494
- canBeConstant, init.finishAndCreateFuture ());
3482
+ IGM.defineTypeMetadata (declaredType, isPattern, canBeConstant,
3483
+ init.finishAndCreateFuture ());
3495
3484
3496
3485
IGM.IRGen .noteUseOfAnyParentTypeMetadata (theEnum);
3497
3486
}
0 commit comments