diff options
author | Richard Mitton <richard@codersnotes.com> | 2013-09-19 23:21:01 +0000 |
---|---|---|
committer | Richard Mitton <richard@codersnotes.com> | 2013-09-19 23:21:01 +0000 |
commit | 21101b32318647f600584d966c697d8773f59629 (patch) | |
tree | 1e34857ba6e750efaf5802334d0beafff5978280 /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | |
parent | 665d3ec3d36ea75844c9cea4ac5fbd17daeeeebc (diff) | |
download | bcm5719-llvm-21101b32318647f600584d966c697d8773f59629.tar.gz bcm5719-llvm-21101b32318647f600584d966c697d8773f59629.zip |
Added support for generate DWARF .debug_aranges sections automatically.
llvm-svn: 191052
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 4893c25c098..2638b3150f0 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -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); |