Sink DwarfUnit::addExpr into DwarfCompileUnit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221090 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie 2014-11-02 07:11:55 +00:00
parent 3c2838f6ad
commit c821f8794d
4 changed files with 10 additions and 10 deletions

View File

@ -820,4 +820,11 @@ void DwarfCompileUnit::applyVariableAttributes(const DbgVariable &Var,
if (Var.isArtificial())
addFlag(VariableDie, dwarf::DW_AT_artificial);
}
/// Add a Dwarf expression attribute data and value.
void DwarfCompileUnit::addExpr(DIELoc &Die, dwarf::Form Form,
const MCExpr *Expr) {
DIEValue *Value = new (DIEValueAllocator) DIEExpr(Expr);
Die.addValue((dwarf::Attribute)0, Form, Value);
}
} // end llvm namespace

View File

@ -211,6 +211,9 @@ 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);
/// Add a Dwarf expression attribute data and value.
void addExpr(DIELoc &Die, dwarf::Form Form, const MCExpr *Expr);
};
} // end llvm namespace

View File

@ -225,13 +225,6 @@ void DwarfUnit::addLocalString(DIE &Die, dwarf::Attribute Attribute,
Die.addValue(Attribute, dwarf::DW_FORM_strp, Str);
}
/// addExpr - Add a Dwarf expression attribute data and value.
///
void DwarfUnit::addExpr(DIELoc &Die, dwarf::Form Form, const MCExpr *Expr) {
DIEValue *Value = new (DIEValueAllocator) DIEExpr(Expr);
Die.addValue((dwarf::Attribute)0, Form, Value);
}
/// addLabel - Add a Dwarf label attribute data and value.
///
void DwarfUnit::addLabel(DIE &Die, dwarf::Attribute Attribute, dwarf::Form Form,

View File

@ -213,9 +213,6 @@ public:
void addLocalString(DIE &Die, dwarf::Attribute Attribute,
StringRef Str);
/// addExpr - Add a Dwarf expression attribute data and value.
void addExpr(DIELoc &Die, dwarf::Form Form, const MCExpr *Expr);
/// addLabel - Add a Dwarf label attribute data and value.
void addLabel(DIE &Die, dwarf::Attribute Attribute, dwarf::Form Form,
const MCSymbol *Label);