summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-04-22 05:41:06 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-04-22 05:41:06 +0000
commitafd2c6be0e90b6e069d768b6a65668186985b5e8 (patch)
tree8ae7729f0c41fed9d9be5b37daccd1797be80366 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
parent2f2021ad3149b5e32541e37b945e277b7e9320b8 (diff)
downloadbcm5719-llvm-afd2c6be0e90b6e069d768b6a65668186985b5e8.tar.gz
bcm5719-llvm-afd2c6be0e90b6e069d768b6a65668186985b5e8.zip
Revert "Use value semantics to manage DbgVariables rather than dynamic allocation/pointers."
This reverts commit r206780. This commit was regressing gdb.opt/inline-locals.exp in the GDB 7.5 test suite. Reverting until I can fix the issue. llvm-svn: 206867
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