Added support for generate DWARF .debug_aranges sections automatically.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191052 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Richard Mitton
2013-09-19 23:21:01 +00:00
parent 70e0b047be
commit 5cc319a42a
18 changed files with 453 additions and 26 deletions
@@ -181,6 +181,12 @@ void CompileUnit::addLabel(DIE *Die, uint16_t Attribute, uint16_t Form,
const MCSymbol *Label) {
DIEValue *Value = new (DIEValueAllocator) DIELabel(Label);
Die->addValue(Attribute, Form, Value);
SymbolCU Entry;
Entry.CU = this;
Entry.Sym = Label;
DD->addLabel(Entry);
}
/// addLabelAddress - Add a dwarf label attribute data and value using
@@ -188,6 +194,14 @@ void CompileUnit::addLabel(DIE *Die, uint16_t Attribute, uint16_t Form,
///
void CompileUnit::addLabelAddress(DIE *Die, uint16_t Attribute,
MCSymbol *Label) {
if (Label) {
SymbolCU Entry;
Entry.CU = this;
Entry.Sym = Label;
DD->addLabel(Entry);
}
if (!DD->useSplitDwarf()) {
if (Label != NULL) {
DIEValue *Value = new (DIEValueAllocator) DIELabel(Label);