diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-11-19 02:26:16 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-11-19 02:26:16 +0000 |
commit | b58867ccbad5c80afa4a2b23cbb39602063a6850 (patch) | |
tree | 21a849b86571c097fcd640dfed5f25c278fce401 /llvm/lib/MC/MCELFStreamer.cpp | |
parent | 348bb56a8270e1bfaa1108cad01357d2d19692c2 (diff) | |
download | bcm5719-llvm-b58867ccbad5c80afa4a2b23cbb39602063a6850.tar.gz bcm5719-llvm-b58867ccbad5c80afa4a2b23cbb39602063a6850.zip |
Change some methods in MCDwarf.cpp to be able to handle an arbitrary
MCStreamer instead of just MCObjectStreamer. Address changes cannot
be as efficient as we have to use DW_LNE_set_addres, but at least
most of the logic is shared.
This will be used so that, with CodeGen still using EmitDwarfLocDirective,
llvm-gcc is able to produce debug_line sections without needing an
assembler that supports .loc.
llvm-svn: 119777
Diffstat (limited to 'llvm/lib/MC/MCELFStreamer.cpp')
-rw-r--r-- | llvm/lib/MC/MCELFStreamer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCELFStreamer.cpp b/llvm/lib/MC/MCELFStreamer.cpp index 75e58de3199..cac48170642 100644 --- a/llvm/lib/MC/MCELFStreamer.cpp +++ b/llvm/lib/MC/MCELFStreamer.cpp @@ -490,7 +490,10 @@ void MCELFStreamer::Finish() { const MCSection *DwarfLineSection = getContext().getELFSection(".debug_line", 0, 0, SectionKind::getDataRelLocal()); - MCDwarfFileTable::Emit(this, DwarfLineSection); + MCSectionData &DLS = + getAssembler().getOrCreateSectionData(*DwarfLineSection); + int PointerSize = getAssembler().getBackend().getPointerSize(); + MCDwarfFileTable::Emit(this, DwarfLineSection, &DLS, PointerSize); } for (std::vector<LocalCommon>::const_iterator i = LocalCommons.begin(), |