From 8a5eafb58d99f6aaf4e0fb4cf86c296f8ca7441e Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 24 Oct 2014 00:43:47 +0000 Subject: [PATCH] DebugInfo: Remove DwarfDebug::addScopeVariable now that it's just a trivial wrapper git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220542 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 12 ++++-------- lib/CodeGen/AsmPrinter/DwarfDebug.h | 2 -- lib/CodeGen/AsmPrinter/DwarfFile.cpp | 3 +-- lib/CodeGen/AsmPrinter/DwarfFile.h | 2 +- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 12915d8a48b..5fcc28e3fb3 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -770,7 +770,7 @@ DbgVariable *DwarfDebug::getExistingAbstractVariable(const DIVariable &DV) { void DwarfDebug::createAbstractVariable(const DIVariable &Var, LexicalScope *Scope) { auto AbsDbgVariable = make_unique(Var, DIExpression(), this); - InfoHolder.addNonArgumentScopeVariable(Scope, AbsDbgVariable.get()); + InfoHolder.addScopeVariable(Scope, AbsDbgVariable.get()); AbstractVariables[Var] = std::move(AbsDbgVariable); } @@ -813,7 +813,7 @@ void DwarfDebug::collectVariableInfoFromMMITable( ConcreteVariables.push_back(make_unique(DV, Expr, this)); DbgVariable *RegVar = ConcreteVariables.back().get(); RegVar->setFrameIndex(VI.Slot); - addScopeVariable(Scope, RegVar); + InfoHolder.addScopeVariable(Scope, RegVar); } } @@ -993,7 +993,7 @@ DwarfDebug::collectVariableInfo(DwarfCompileUnit &TheCU, DISubprogram SP, ensureAbstractVariableIsCreatedIfScoped(DV, Scope->getScopeNode()); ConcreteVariables.push_back(make_unique(MInsn, this)); DbgVariable *RegVar = ConcreteVariables.back().get(); - addScopeVariable(Scope, RegVar); + InfoHolder.addScopeVariable(Scope, RegVar); // Check if the first DBG_VALUE is valid for the rest of the function. if (Ranges.size() == 1 && Ranges.front().second == nullptr) @@ -1023,7 +1023,7 @@ DwarfDebug::collectVariableInfo(DwarfCompileUnit &TheCU, DISubprogram SP, ensureAbstractVariableIsCreatedIfScoped(DV, Scope->getScopeNode()); DIExpression NoExpr; ConcreteVariables.push_back(make_unique(DV, NoExpr, this)); - addScopeVariable(Scope, ConcreteVariables.back().get()); + InfoHolder.addScopeVariable(Scope, ConcreteVariables.back().get()); } } } @@ -1253,10 +1253,6 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) { } } -void DwarfDebug::addScopeVariable(LexicalScope *LS, DbgVariable *Var) { - InfoHolder.addNonArgumentScopeVariable(LS, Var); -} - // Gather and emit post-function debug information. void DwarfDebug::endFunction(const MachineFunction *MF) { assert(CurFn == MF && diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h index 927ef76e4bd..96922130ad9 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -330,8 +330,6 @@ class DwarfDebug : public AsmPrinterHandler { MCDwarfDwoLineTable *getDwoLineTable(const DwarfCompileUnit &); - void addScopeVariable(LexicalScope *LS, DbgVariable *Var); - const SmallVectorImpl> &getUnits() { return InfoHolder.getUnits(); } diff --git a/lib/CodeGen/AsmPrinter/DwarfFile.cpp b/lib/CodeGen/AsmPrinter/DwarfFile.cpp index 0d92169587b..e9df3854e78 100644 --- a/lib/CodeGen/AsmPrinter/DwarfFile.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfFile.cpp @@ -155,8 +155,7 @@ void DwarfFile::emitStrings(const MCSection *StrSection, StrPool.emit(*Asm, StrSection, OffsetSection); } -void DwarfFile::addNonArgumentScopeVariable(LexicalScope *LS, - DbgVariable *Var) { +void DwarfFile::addScopeVariable(LexicalScope *LS, DbgVariable *Var) { SmallVectorImpl &Vars = DD.getScopeVariables()[LS]; DIVariable DV = Var->getVariable(); // Variables with positive arg numbers are parameters. diff --git a/lib/CodeGen/AsmPrinter/DwarfFile.h b/lib/CodeGen/AsmPrinter/DwarfFile.h index 011b5de6c6e..7183cd647cb 100644 --- a/lib/CodeGen/AsmPrinter/DwarfFile.h +++ b/lib/CodeGen/AsmPrinter/DwarfFile.h @@ -84,7 +84,7 @@ public: /// \brief Returns the string pool. DwarfStringPool &getStringPool() { return StrPool; } - void addNonArgumentScopeVariable(LexicalScope *LS, DbgVariable *Var); + void addScopeVariable(LexicalScope *LS, DbgVariable *Var); }; } #endif -- 2.34.1