@@ -1733,12 +1733,12 @@ void IRGenFunction::emit##ID(llvm::Value *value, Address src) { \
17331733#undef DEFINE_STORE_WEAK_OP
17341734#undef NEVER_OR_SOMETIMES_LOADABLE_CHECKED_REF_STORAGE_HELPER
17351735
1736- llvm::Value *IRGenFunction::getLocalSelfMetadata () {
1737- assert (LocalSelf && " no local self metadata" );
1736+ llvm::Value *IRGenFunction::getDynamicSelfMetadata () {
1737+ assert (SelfValue && " no local self metadata" );
17381738
17391739 // If we already have a metatype, just return it.
17401740 if (SelfKind == SwiftMetatype)
1741- return LocalSelf ;
1741+ return SelfValue ;
17421742
17431743 // We need to materialize a metatype. Emit the code for that once at the
17441744 // top of the function and cache the result.
@@ -1754,29 +1754,29 @@ llvm::Value *IRGenFunction::getLocalSelfMetadata() {
17541754 // with the correct value.
17551755
17561756 llvm::IRBuilderBase::InsertPointGuard guard (Builder);
1757- auto insertPt = isa<llvm::Instruction>(LocalSelf )
1757+ auto insertPt = isa<llvm::Instruction>(SelfValue )
17581758 ? std::next (llvm::BasicBlock::iterator (
1759- cast<llvm::Instruction>(LocalSelf )))
1759+ cast<llvm::Instruction>(SelfValue )))
17601760 : CurFn->getEntryBlock ().begin ();
17611761 Builder.SetInsertPoint (&CurFn->getEntryBlock (), insertPt);
17621762
17631763 switch (SelfKind) {
17641764 case SwiftMetatype:
17651765 llvm_unreachable (" Already handled" );
17661766 case ObjCMetatype:
1767- LocalSelf = emitObjCMetadataRefForMetadata (*this , LocalSelf );
1767+ SelfValue = emitObjCMetadataRefForMetadata (*this , SelfValue );
17681768 SelfKind = SwiftMetatype;
17691769 break ;
17701770 case ObjectReference:
1771- LocalSelf = emitDynamicTypeOfHeapObject (*this , LocalSelf ,
1771+ SelfValue = emitDynamicTypeOfHeapObject (*this , SelfValue ,
17721772 MetatypeRepresentation::Thick,
1773- SILType::getPrimitiveObjectType (LocalSelfType ),
1773+ SILType::getPrimitiveObjectType (SelfType ),
17741774 /* allow artificial*/ false );
17751775 SelfKind = SwiftMetatype;
17761776 break ;
17771777 }
17781778
1779- return LocalSelf ;
1779+ return SelfValue ;
17801780}
17811781
17821782// / Given a non-tagged object pointer, load a pointer to its class object.
0 commit comments