mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-23 04:28:30 +00:00
Sink DwarfUnit::applyVariableAttributes into DwarfCompileUnit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221088 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
51af3541a8
commit
9aa32f9e1f
@ -809,4 +809,15 @@ void DwarfCompileUnit::addLocationList(DIE &Die, dwarf::Attribute Attribute,
|
||||
: dwarf::DW_FORM_data4;
|
||||
Die.addValue(Attribute, Form, Value);
|
||||
}
|
||||
|
||||
void DwarfUnit::applyVariableAttributes(const DbgVariable &Var,
|
||||
DIE &VariableDie) {
|
||||
StringRef Name = Var.getName();
|
||||
if (!Name.empty())
|
||||
addString(VariableDie, dwarf::DW_AT_name, Name);
|
||||
addSourceLine(VariableDie, Var.getVariable());
|
||||
addType(VariableDie, Var.getType());
|
||||
if (Var.isArtificial())
|
||||
addFlag(VariableDie, dwarf::DW_AT_artificial);
|
||||
}
|
||||
} // end llvm namespace
|
||||
|
@ -210,6 +210,7 @@ public:
|
||||
|
||||
/// Add a Dwarf loclistptr attribute data and value.
|
||||
void addLocationList(DIE &Die, dwarf::Attribute Attribute, unsigned Index);
|
||||
void applyVariableAttributes(const DbgVariable &Var, DIE &VariableDie);
|
||||
};
|
||||
|
||||
} // end llvm namespace
|
||||
|
@ -1381,17 +1381,6 @@ void DwarfUnit::applySubprogramAttributes(DISubprogram SP, DIE &SPDie) {
|
||||
addFlag(SPDie, dwarf::DW_AT_explicit);
|
||||
}
|
||||
|
||||
void DwarfUnit::applyVariableAttributes(const DbgVariable &Var,
|
||||
DIE &VariableDie) {
|
||||
StringRef Name = Var.getName();
|
||||
if (!Name.empty())
|
||||
addString(VariableDie, dwarf::DW_AT_name, Name);
|
||||
addSourceLine(VariableDie, Var.getVariable());
|
||||
addType(VariableDie, Var.getType());
|
||||
if (Var.isArtificial())
|
||||
addFlag(VariableDie, dwarf::DW_AT_artificial);
|
||||
}
|
||||
|
||||
/// constructSubrangeDIE - Construct subrange DIE from DISubrange.
|
||||
void DwarfUnit::constructSubrangeDIE(DIE &Buffer, DISubrange SR, DIE *IndexTy) {
|
||||
DIE &DW_Subrange = createAndAddDIE(dwarf::DW_TAG_subrange_type, Buffer);
|
||||
|
@ -304,7 +304,6 @@ public:
|
||||
|
||||
void applySubprogramAttributes(DISubprogram SP, DIE &SPDie);
|
||||
void applySubprogramAttributesToDefinition(DISubprogram SP, DIE &SPDie);
|
||||
void applyVariableAttributes(const DbgVariable &Var, DIE &VariableDie);
|
||||
|
||||
/// getOrCreateTypeDIE - Find existing DIE or create new DIE for the
|
||||
/// given DIType.
|
||||
|
Loading…
Reference in New Issue
Block a user