mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +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:
@ -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
|
||||
|
Reference in New Issue
Block a user