@@ -2289,36 +2289,6 @@ bool irgen::hasKnownSwiftMetadata(IRGenModule &IGM, ClassDecl *theClass) {
2289
2289
return theClass->hasKnownSwiftImplementation ();
2290
2290
}
2291
2291
2292
- // / Given a reference to class metadata of the given type,
2293
- // / load the fragile instance size and alignment of the class.
2294
- std::pair<llvm::Value *, llvm::Value *>
2295
- irgen::emitClassFragileInstanceSizeAndAlignMask (IRGenFunction &IGF,
2296
- ClassDecl *theClass,
2297
- llvm::Value *metadata) {
2298
- // FIXME: The below checks should capture this property already, but
2299
- // resilient class metadata layout is not fully implemented yet.
2300
- auto superClass = theClass;
2301
- do {
2302
- if (superClass->getParentModule () != IGF.IGM .getSwiftModule ()) {
2303
- return emitClassResilientInstanceSizeAndAlignMask (IGF, theClass,
2304
- metadata);
2305
- }
2306
- } while ((superClass = superClass->getSuperclassDecl ()));
2307
-
2308
- // If the class has fragile fixed layout, return the constant size and
2309
- // alignment.
2310
- if (llvm::Constant *size
2311
- = tryEmitClassConstantFragileInstanceSize (IGF.IGM , theClass)) {
2312
- llvm::Constant *alignMask
2313
- = tryEmitClassConstantFragileInstanceAlignMask (IGF.IGM , theClass);
2314
- assert (alignMask && " static size without static align" );
2315
- return {size, alignMask};
2316
- }
2317
-
2318
- // Otherwise, load it from the metadata.
2319
- return emitClassResilientInstanceSizeAndAlignMask (IGF, theClass, metadata);
2320
- }
2321
-
2322
2292
std::pair<llvm::Value *, llvm::Value *>
2323
2293
irgen::emitClassResilientInstanceSizeAndAlignMask (IRGenFunction &IGF,
2324
2294
ClassDecl *theClass,
0 commit comments