diff options
author | Devang Patel <dpatel@apple.com> | 2011-08-15 19:01:20 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-08-15 19:01:20 +0000 |
commit | 99819b527d904011b41004cf32235ca08c599d8b (patch) | |
tree | 7f7a4c566239afd954b31966891c84f6be39d4e8 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | |
parent | 3157f2eebe7fcc943f53cc31f37ffde997ce3901 (diff) | |
download | bcm5719-llvm-99819b527d904011b41004cf32235ca08c599d8b.tar.gz bcm5719-llvm-99819b527d904011b41004cf32235ca08c599d8b.zip |
Simplify mapping to variable from its abstract variable info.
When a variable is inlined multiple places, abstract variable keeps name, location, type etc.. info and all other concreate instances of the variable directly refers to abstract variable.
llvm-svn: 137637
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h index 97704b94cf2..01d710f1de6 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -125,9 +125,11 @@ class DbgVariable { DIVariable Var; // Variable Descriptor. DIE *TheDIE; // Variable DIE. unsigned DotDebugLocOffset; // Offset in DotDebugLocEntries. + DbgVariable *AbsVar; // Corresponding Abstract variable, if any. public: // AbsVar may be NULL. - DbgVariable(DIVariable V) : Var(V), TheDIE(0), DotDebugLocOffset(~0U) {} + DbgVariable(DIVariable V, DbgVariable *AV) + : Var(V), TheDIE(0), DotDebugLocOffset(~0U), AbsVar(AV) {} // Accessors. DIVariable getVariable() const { return Var; } @@ -136,6 +138,7 @@ public: void setDotDebugLocOffset(unsigned O) { DotDebugLocOffset = O; } unsigned getDotDebugLocOffset() const { return DotDebugLocOffset; } StringRef getName() const { return Var.getName(); } + DbgVariable *getAbstractVariable() const { return AbsVar; } // Translate tag to proper Dwarf tag. unsigned getTag() const { if (Var.getTag() == dwarf::DW_TAG_arg_variable) @@ -236,10 +239,6 @@ class DwarfDebug { /// idetifies corresponding .debug_loc entry offset. SmallPtrSet<const DIE *, 4> UseDotDebugLocEntry; - /// VarToAbstractVarMap - Maps DbgVariable with corresponding Abstract - /// DbgVariable, if any. - DenseMap<const DbgVariable *, const DbgVariable *> VarToAbstractVarMap; - /// InliendSubprogramDIEs - Collection of subprgram DIEs that are marked /// (at the end of the module) as DW_AT_inline. SmallPtrSet<DIE *, 4> InlinedSubprogramDIEs; |