mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137637 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user