mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-28 06:24:57 +00:00
Refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137631 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -377,20 +377,8 @@ DIE *DwarfDebug::constructVariableDIE(DbgVariable *DV, LexicalScope *Scope) {
|
|||||||
if (Name.empty())
|
if (Name.empty())
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
// Translate tag to proper Dwarf tag. The result variable is dropped for
|
// Translate tag to proper Dwarf tag.
|
||||||
// now.
|
unsigned Tag = DV->getTag();
|
||||||
unsigned Tag;
|
|
||||||
switch (DV->getTag()) {
|
|
||||||
case dwarf::DW_TAG_return_variable:
|
|
||||||
return NULL;
|
|
||||||
case dwarf::DW_TAG_arg_variable:
|
|
||||||
Tag = dwarf::DW_TAG_formal_parameter;
|
|
||||||
break;
|
|
||||||
case dwarf::DW_TAG_auto_variable: // fall thru
|
|
||||||
default:
|
|
||||||
Tag = dwarf::DW_TAG_variable;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Define variable debug information entry.
|
// Define variable debug information entry.
|
||||||
DIE *VariableDie = new DIE(Tag);
|
DIE *VariableDie = new DIE(Tag);
|
||||||
|
@ -136,7 +136,13 @@ public:
|
|||||||
void setDotDebugLocOffset(unsigned O) { DotDebugLocOffset = O; }
|
void setDotDebugLocOffset(unsigned O) { DotDebugLocOffset = O; }
|
||||||
unsigned getDotDebugLocOffset() const { return DotDebugLocOffset; }
|
unsigned getDotDebugLocOffset() const { return DotDebugLocOffset; }
|
||||||
StringRef getName() const { return Var.getName(); }
|
StringRef getName() const { return Var.getName(); }
|
||||||
unsigned getTag() const { return Var.getTag(); }
|
// Translate tag to proper Dwarf tag.
|
||||||
|
unsigned getTag() const {
|
||||||
|
if (Var.getTag() == dwarf::DW_TAG_arg_variable)
|
||||||
|
return dwarf::DW_TAG_formal_parameter;
|
||||||
|
|
||||||
|
return dwarf::DW_TAG_variable;
|
||||||
|
}
|
||||||
bool variableHasComplexAddress() const {
|
bool variableHasComplexAddress() const {
|
||||||
assert(Var.Verify() && "Invalid complex DbgVariable!");
|
assert(Var.Verify() && "Invalid complex DbgVariable!");
|
||||||
return Var.hasComplexAddress();
|
return Var.hasComplexAddress();
|
||||||
|
Reference in New Issue
Block a user