@@ -1637,7 +1637,7 @@ bool LinkInfo::isUsed(IRLinkage IRL) {
16371637llvm::GlobalVariable *swift::irgen::createVariable (
16381638 IRGenModule &IGM, LinkInfo &linkInfo, llvm::Type *storageType,
16391639 Alignment alignment, DebugTypeInfo DbgTy, Optional<SILLocation> DebugLoc,
1640- StringRef DebugName, bool inFixedBuffer, bool indirectForDebugInfo ) {
1640+ StringRef DebugName, bool inFixedBuffer) {
16411641 auto name = linkInfo.getName ();
16421642 llvm::GlobalValue *existingValue = IGM.Module .getNamedGlobal (name);
16431643 if (existingValue) {
@@ -1671,7 +1671,7 @@ llvm::GlobalVariable *swift::irgen::createVariable(
16711671 if (IGM.DebugInfo && !DbgTy.isNull () && linkInfo.isForDefinition ())
16721672 IGM.DebugInfo ->emitGlobalVariableDeclaration (
16731673 var, DebugName.empty () ? name : DebugName, name, DbgTy,
1674- var->hasInternalLinkage (), indirectForDebugInfo , DebugLoc);
1674+ var->hasInternalLinkage (), inFixedBuffer , DebugLoc);
16751675
16761676 return var;
16771677}
@@ -1809,13 +1809,6 @@ Address IRGenModule::getAddrOfSILGlobalVariable(SILGlobalVariable *var,
18091809 Size fixedSize;
18101810 Alignment fixedAlignment;
18111811 bool inFixedBuffer = false ;
1812- bool indirectForDebugInfo = false ;
1813-
1814- // FIXME: Remove this once LLDB has proper support for resilience.
1815- bool isREPLVar = false ;
1816- if (auto *decl = var->getDecl ())
1817- if (decl->isREPLVar ())
1818- isREPLVar = true ;
18191812
18201813 if (var->isInitializedObject ()) {
18211814 assert (ti.isFixedSize (expansion));
@@ -1837,7 +1830,7 @@ Address IRGenModule::getAddrOfSILGlobalVariable(SILGlobalVariable *var,
18371830 fixedAlignment = Layout->getAlignment ();
18381831 castStorageToType = cast<FixedTypeInfo>(ti).getStorageType ();
18391832 assert (fixedAlignment >= TargetInfo.HeapObjectAlignment );
1840- } else if (isREPLVar || ti.isFixedSize (expansion)) {
1833+ } else if (ti.isFixedSize (expansion)) {
18411834 // Allocate static storage.
18421835 auto &fixedTI = cast<FixedTypeInfo>(ti);
18431836 storageType = fixedTI.getStorageType ();
@@ -1850,28 +1843,6 @@ Address IRGenModule::getAddrOfSILGlobalVariable(SILGlobalVariable *var,
18501843 storageType = getFixedBufferTy ();
18511844 fixedSize = Size (DataLayout.getTypeAllocSize (storageType));
18521845 fixedAlignment = Alignment (DataLayout.getABITypeAlignment (storageType));
1853-
1854- // DebugInfo is not resilient for now, so disable resilience to figure out
1855- // if lldb needs to dereference the global variable or not.
1856- //
1857- // FIXME: Once lldb can make use of remote mirrors to calculate layouts
1858- // at runtime, this should be removed.
1859- {
1860- LoweringModeScope Scope (*this , TypeConverter::Mode::CompletelyFragile);
1861-
1862- SILType loweredTy = var->getLoweredType ();
1863- auto &nonResilientTI = cast<FixedTypeInfo>(getTypeInfo (loweredTy));
1864- auto packing = nonResilientTI.getFixedPacking (*this );
1865- switch (packing) {
1866- case FixedPacking::OffsetZero:
1867- break ;
1868- case FixedPacking::Allocate:
1869- indirectForDebugInfo = true ;
1870- break ;
1871- default :
1872- llvm_unreachable (" Bad packing" );
1873- }
1874- }
18751846 }
18761847
18771848 // Check whether we've created the global variable already.
@@ -1913,8 +1884,7 @@ Address IRGenModule::getAddrOfSILGlobalVariable(SILGlobalVariable *var,
19131884 auto DbgTy = DebugTypeInfo::getGlobal (var, storageTypeWithContainer,
19141885 fixedSize, fixedAlignment);
19151886 gvar = createVariable (*this , link, storageTypeWithContainer,
1916- fixedAlignment, DbgTy, loc, name, inFixedBuffer,
1917- indirectForDebugInfo);
1887+ fixedAlignment, DbgTy, loc, name, inFixedBuffer);
19181888 }
19191889 // / Add a zero initializer.
19201890 if (forDefinition)
0 commit comments