@@ -1869,28 +1869,10 @@ DbgEntity *DwarfDebug::createConcreteEntity(DwarfCompileUnit &TheCU,
18691869 return ConcreteEntities.back ().get ();
18701870}
18711871
1872- #if 0
1873- void DwarfDebug::populateDependentTypeMap() {
1874- for (const auto &I : DbgValues) {
1875- InlinedEntity IV = I.first;
1876- if (I.second.empty())
1877- continue;
1878- if (const DIVariable *DIV = dyn_cast<DIVariable>(IV.first)) {
1879- if (const DIStringType *ST = dyn_cast<DIStringType>(
1880- static_cast<const Metadata *>(DIV->getType())))
1881- if (const DIVariable *LV = ST->getStringLength())
1882- VariableInDependentType[LV] = ST;
1883- }
1884- }
1885- }
1886- #endif
1887-
18881872// Find variables for each lexical scope.
18891873void DwarfDebug::collectEntityInfo (DwarfCompileUnit &TheCU,
18901874 const DISubprogram *SP,
18911875 DenseSet<InlinedEntity> &Processed) {
1892- // clearDependentTracking();
1893- // populateDependentTypeMap();
18941876 // Grab the variable info that was squirreled away in the MMI side-table.
18951877 collectVariableInfoFromMFTable (TheCU, Processed);
18961878
@@ -1909,11 +1891,6 @@ void DwarfDebug::collectEntityInfo(DwarfCompileUnit &TheCU,
19091891
19101892 LexicalScope *Scope = nullptr ;
19111893 const DILocalVariable *LocalVar = cast<DILocalVariable>(IV.first );
1912- #if 0
1913- const DILocalVariable *LocalVar = dyn_cast<DILocalVariable>(IV.first);
1914- if (!LocalVar)
1915- continue;
1916- #endif
19171894 if (const DILocation *IA = IV.second )
19181895 Scope = LScopes.findInlinedScope (LocalVar->getScope (), IA);
19191896 else
@@ -1972,24 +1949,6 @@ void DwarfDebug::collectEntityInfo(DwarfCompileUnit &TheCU,
19721949 // Finalize the entry by lowering it into a DWARF bytestream.
19731950 for (auto &Entry : Entries)
19741951 Entry.finalize (*Asm, List, BT, TheCU);
1975- #if 0
1976- List.finalize();
1977-
1978- if (VariableInDependentType.count(LocalVar)) {
1979- const DIType *DT = VariableInDependentType[LocalVar];
1980- if (const DIStringType *ST = dyn_cast<DIStringType>(DT)) {
1981- unsigned Offset;
1982- DbgVariable TVar = {LocalVar, IV.second};
1983- DebugLocStream::ListBuilder LB(DebugLocs, TheCU, *Asm, TVar, *MInsn);
1984- for (auto &Entry : Entries)
1985- Entry.finalize(*Asm, LB, ST, TheCU);
1986- LB.finalize();
1987- Offset = TVar.getDebugLocListIndex();
1988- if (Offset != ~0u)
1989- addStringTypeLoc(ST, Offset);
1990- }
1991- }
1992- #endif
19931952 }
19941953
19951954 // For each InlinedEntity collected from DBG_LABEL instructions, convert to
@@ -2799,35 +2758,6 @@ void DebugLocEntry::finalize(const AsmPrinter &AP,
27992758 List.setTagOffset (*DwarfExpr.TagOffset );
28002759}
28012760
2802- #if 0
2803- inline static DbgValueLoc mkDbgValueLoc(const DIExpression *expr,
2804- DbgValueLoc &value) {
2805- if (value.isInt())
2806- return DbgValueLoc(expr, value.getInt());
2807- if (value.isLocation())
2808- return DbgValueLoc(expr, value.getLoc());
2809- if (value.isConstantInt())
2810- return DbgValueLoc(expr, value.getConstantInt());
2811- assert(value.isConstantFP());
2812- return DbgValueLoc(expr, value.getConstantFP());
2813- }
2814-
2815- void DebugLocEntry::finalize(const AsmPrinter &AP,
2816- DebugLocStream::ListBuilder &List,
2817- const DIStringType *ST,
2818- DwarfCompileUnit &TheCU) {
2819- DebugLocStream::EntryBuilder Entry(List, Begin, End);
2820- BufferByteStreamer Streamer = Entry.getStreamer();
2821- DebugLocDwarfExpression DwarfExpr(AP.getDwarfVersion(), Streamer, TheCU);
2822- DbgValueLoc &Value = Values[0];
2823- assert(!Value.isFragment());
2824- assert(Values.size() == 1 && "only fragments may have >1 value");
2825- Value = mkDbgValueLoc(ST->getStringLengthExp(), Value);
2826- DwarfDebug::emitDebugLocValue(AP, nullptr, Value, DwarfExpr);
2827- DwarfExpr.finalize();
2828- }
2829- #endif
2830-
28312761void DwarfDebug::emitDebugLocEntryLocation (const DebugLocStream::Entry &Entry,
28322762 const DwarfCompileUnit *CU) {
28332763 // Emit the size.
0 commit comments