Skip to content

Commit bee6b09

Browse files
committed
IRGen: Remove emitClassFragileInstanceSizeAndAlignMask()
1 parent 9e15390 commit bee6b09

File tree

2 files changed

+0
-37
lines changed

2 files changed

+0
-37
lines changed

lib/IRGen/GenClass.cpp

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2289,36 +2289,6 @@ bool irgen::hasKnownSwiftMetadata(IRGenModule &IGM, ClassDecl *theClass) {
22892289
return theClass->hasKnownSwiftImplementation();
22902290
}
22912291

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-
23222292
std::pair<llvm::Value *, llvm::Value *>
23232293
irgen::emitClassResilientInstanceSizeAndAlignMask(IRGenFunction &IGF,
23242294
ClassDecl *theClass,

lib/IRGen/GenClass.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,6 @@ namespace irgen {
171171
bool doesClassMetadataRequireDynamicInitialization(IRGenModule &IGM,
172172
ClassDecl *theClass);
173173

174-
/// Load the fragile instance size and alignment mask from a reference to
175-
/// class type metadata of the given type.
176-
std::pair<llvm::Value *, llvm::Value *>
177-
emitClassFragileInstanceSizeAndAlignMask(IRGenFunction &IGF,
178-
ClassDecl *theClass,
179-
llvm::Value *metadata);
180-
181174
/// Load the instance size and alignment mask from a reference to
182175
/// class type metadata of the given type.
183176
std::pair<llvm::Value *, llvm::Value *>

0 commit comments

Comments
 (0)