@@ -1640,7 +1640,7 @@ bool LinkInfo::isUsed(IRLinkage IRL) {
16401640llvm::GlobalVariable *swift::irgen::createVariable (
16411641 IRGenModule &IGM, LinkInfo &linkInfo, llvm::Type *storageType,
16421642 Alignment alignment, DebugTypeInfo DbgTy, Optional<SILLocation> DebugLoc,
1643- StringRef DebugName, bool inFixedBuffer, bool indirectForDebugInfo ) {
1643+ StringRef DebugName, bool inFixedBuffer) {
16441644 auto name = linkInfo.getName ();
16451645 llvm::GlobalValue *existingValue = IGM.Module .getNamedGlobal (name);
16461646 if (existingValue) {
@@ -1674,7 +1674,7 @@ llvm::GlobalVariable *swift::irgen::createVariable(
16741674 if (IGM.DebugInfo && !DbgTy.isNull () && linkInfo.isForDefinition ())
16751675 IGM.DebugInfo ->emitGlobalVariableDeclaration (
16761676 var, DebugName.empty () ? name : DebugName, name, DbgTy,
1677- var->hasInternalLinkage (), indirectForDebugInfo , DebugLoc);
1677+ var->hasInternalLinkage (), inFixedBuffer , DebugLoc);
16781678
16791679 return var;
16801680}
@@ -1812,13 +1812,6 @@ Address IRGenModule::getAddrOfSILGlobalVariable(SILGlobalVariable *var,
18121812 Size fixedSize;
18131813 Alignment fixedAlignment;
18141814 bool inFixedBuffer = false ;
1815- bool indirectForDebugInfo = false ;
1816-
1817- // FIXME: Remove this once LLDB has proper support for resilience.
1818- bool isREPLVar = false ;
1819- if (auto *decl = var->getDecl ())
1820- if (decl->isREPLVar ())
1821- isREPLVar = true ;
18221815
18231816 if (var->isInitializedObject ()) {
18241817 assert (ti.isFixedSize (expansion));
@@ -1840,7 +1833,7 @@ Address IRGenModule::getAddrOfSILGlobalVariable(SILGlobalVariable *var,
18401833 fixedAlignment = Layout->getAlignment ();
18411834 castStorageToType = cast<FixedTypeInfo>(ti).getStorageType ();
18421835 assert (fixedAlignment >= TargetInfo.HeapObjectAlignment );
1843- } else if (isREPLVar || ti.isFixedSize (expansion)) {
1836+ } else if (ti.isFixedSize (expansion)) {
18441837 // Allocate static storage.
18451838 auto &fixedTI = cast<FixedTypeInfo>(ti);
18461839 storageType = fixedTI.getStorageType ();
@@ -1853,28 +1846,6 @@ Address IRGenModule::getAddrOfSILGlobalVariable(SILGlobalVariable *var,
18531846 storageType = getFixedBufferTy ();
18541847 fixedSize = Size (DataLayout.getTypeAllocSize (storageType));
18551848 fixedAlignment = Alignment (DataLayout.getABITypeAlignment (storageType));
1856-
1857- // DebugInfo is not resilient for now, so disable resilience to figure out
1858- // if lldb needs to dereference the global variable or not.
1859- //
1860- // FIXME: Once lldb can make use of remote mirrors to calculate layouts
1861- // at runtime, this should be removed.
1862- {
1863- LoweringModeScope Scope (*this , TypeConverter::Mode::CompletelyFragile);
1864-
1865- SILType loweredTy = var->getLoweredType ();
1866- auto &nonResilientTI = cast<FixedTypeInfo>(getTypeInfo (loweredTy));
1867- auto packing = nonResilientTI.getFixedPacking (*this );
1868- switch (packing) {
1869- case FixedPacking::OffsetZero:
1870- break ;
1871- case FixedPacking::Allocate:
1872- indirectForDebugInfo = true ;
1873- break ;
1874- default :
1875- llvm_unreachable (" Bad packing" );
1876- }
1877- }
18781849 }
18791850
18801851 // Check whether we've created the global variable already.
@@ -1916,8 +1887,7 @@ Address IRGenModule::getAddrOfSILGlobalVariable(SILGlobalVariable *var,
19161887 auto DbgTy = DebugTypeInfo::getGlobal (var, storageTypeWithContainer,
19171888 fixedSize, fixedAlignment);
19181889 gvar = createVariable (*this , link, storageTypeWithContainer,
1919- fixedAlignment, DbgTy, loc, name, inFixedBuffer,
1920- indirectForDebugInfo);
1890+ fixedAlignment, DbgTy, loc, name, inFixedBuffer);
19211891 }
19221892 // / Add a zero initializer.
19231893 if (forDefinition)
0 commit comments