summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 0c1922ed3aa..8c4514e615e 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -30,8 +30,6 @@
#include "llvm/MC/MCDwarf.h"
#include "llvm/Support/Allocator.h"
-#include <list>
-
namespace llvm {
class AsmPrinter;
@@ -276,9 +274,7 @@ class DwarfDebug : public AsmPrinterHandler {
SectionMapType SectionMap;
// List of arguments for current function.
- // Linked list use to maintain pointer validity. Singly linked list could
- // suffice with some contortions to addCurrentFnArgument.
- std::list<DbgVariable> CurrentFnArguments;
+ SmallVector<DbgVariable *, 8> CurrentFnArguments;
LexicalScopes LScopes;
@@ -286,9 +282,7 @@ class DwarfDebug : public AsmPrinterHandler {
DenseMap<const MDNode *, DIE *> AbstractSPDies;
// Collection of dbg variables of a scope.
- // Linked list use to maintain pointer validity. Singly linked list could
- // suffice with some contortions to addScopeVariable.
- typedef DenseMap<LexicalScope *, std::list<DbgVariable>>
+ typedef DenseMap<LexicalScope *, SmallVector<DbgVariable *, 8> >
ScopeVariablesMap;
ScopeVariablesMap ScopeVariables;
@@ -419,7 +413,7 @@ class DwarfDebug : public AsmPrinterHandler {
MCDwarfDwoLineTable *getDwoLineTable(const DwarfCompileUnit &);
- DbgVariable &addScopeVariable(LexicalScope *LS, DbgVariable Var);
+ void addScopeVariable(LexicalScope *LS, DbgVariable *Var);
const SmallVectorImpl<DwarfUnit *> &getUnits() {
return InfoHolder.getUnits();
@@ -597,9 +591,7 @@ class DwarfDebug : public AsmPrinterHandler {
/// \brief If Var is an current function argument that add it in
/// CurrentFnArguments list.
- DbgVariable *addCurrentFnArgument(DbgVariable &Var, LexicalScope *Scope);
-
- DbgVariable &addVariable(DbgVariable Var, LexicalScope *Scope);
+ bool addCurrentFnArgument(DbgVariable *Var, LexicalScope *Scope);
/// \brief Populate LexicalScope entries with variables' info.
void collectVariableInfo(SmallPtrSet<const MDNode *, 16> &ProcessedVars);
OpenPOWER on IntegriCloud