diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | 7 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfFile.h | 7 |
5 files changed, 11 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index f1ee52da8d4..6fff9ecf290 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -530,7 +530,7 @@ DIE *DwarfCompileUnit::createScopeChildrenDIE( unsigned *ChildScopeCount) { DIE *ObjectPointer = nullptr; - for (DbgVariable *DV : DD->getScopeVariables().lookup(Scope)) + for (DbgVariable *DV : DU->getScopeVariables().lookup(Scope)) Children.push_back(constructVariableDIE(*DV, *Scope, ObjectPointer)); unsigned ChildCountWithoutScopes = Children.size(); diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 19c8c393293..68f10275dc6 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1284,7 +1284,7 @@ void DwarfDebug::endFunction(const MachineFunction *MF) { // subroutines inside it. if (TheCU.getCUNode().getEmissionKind() == DIBuilder::LineTablesOnly && LScopes.getAbstractScopesList().empty() && !IsDarwin) { - assert(ScopeVariables.empty()); + assert(InfoHolder.getScopeVariables().empty()); assert(DbgValues.empty()); // FIXME: This wouldn't be true in LTO with a -g (with inlining) CU followed // by a -gmlt CU. Add a test and remove this assertion. @@ -1323,7 +1323,7 @@ void DwarfDebug::endFunction(const MachineFunction *MF) { // Ownership of DbgVariables is a bit subtle - ScopeVariables owns all the // DbgVariables except those that are also in AbstractVariables (since they // can be used cross-function) - ScopeVariables.clear(); + InfoHolder.getScopeVariables().clear(); DbgValues.clear(); LabelsBeforeInsn.clear(); LabelsAfterInsn.clear(); diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h index 2c7955dd087..c1215c046f7 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -193,11 +193,6 @@ class DwarfDebug : public AsmPrinterHandler { // Collection of abstract subprogram DIEs. DenseMap<const MDNode *, DIE *> AbstractSPDies; - // Collection of dbg variables of a scope. - typedef DenseMap<LexicalScope *, SmallVector<DbgVariable *, 8> > - ScopeVariablesMap; - ScopeVariablesMap ScopeVariables; - // Collection of abstract variables. DenseMap<const MDNode *, std::unique_ptr<DbgVariable>> AbstractVariables; SmallVector<std::unique_ptr<DbgVariable>, 64> ConcreteVariables; @@ -659,8 +654,6 @@ public: return AbstractSPDies; } - ScopeVariablesMap &getScopeVariables() { return ScopeVariables; } - SmallPtrSet<const MDNode *, 16> &getProcessedSPNodes() { return ProcessedSPNodes; } diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp index e9df3854e78..3d49db3db7e 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp @@ -156,7 +156,7 @@ void DwarfFile::emitStrings(const MCSection *StrSection, } void DwarfFile::addScopeVariable(LexicalScope *LS, DbgVariable *Var) { - SmallVectorImpl<DbgVariable *> &Vars = DD.getScopeVariables()[LS]; + SmallVectorImpl<DbgVariable *> &Vars = ScopeVariables[LS]; DIVariable DV = Var->getVariable(); // Variables with positive arg numbers are parameters. if (unsigned ArgNum = DV.getArgNumber()) { diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.h b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.h index 7183cd647cb..cfca3666f0f 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.h @@ -50,6 +50,9 @@ class DwarfFile { DwarfStringPool StrPool; + // Collection of dbg variables of a scope. + DenseMap<LexicalScope *, SmallVector<DbgVariable *, 8>> ScopeVariables; + public: DwarfFile(AsmPrinter *AP, DwarfDebug &DD, StringRef Pref, BumpPtrAllocator &DA); @@ -85,6 +88,10 @@ public: DwarfStringPool &getStringPool() { return StrPool; } void addScopeVariable(LexicalScope *LS, DbgVariable *Var); + + DenseMap<LexicalScope *, SmallVector<DbgVariable *, 8>> &getScopeVariables() { + return ScopeVariables; + } }; } #endif |