aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC/MCELFStreamer.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-11-19 02:26:16 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-11-19 02:26:16 +0000
commit195a0ce484cd12a5adae9184188f6d0fb52b84c0 (patch)
tree75909dd2fcd8778aaf56da67446bf1b6f4615d9c /lib/MC/MCELFStreamer.cpp
parent602890dd8ef53c6e8d60a2752b97940f7a58de1a (diff)
downloadexternal_llvm-195a0ce484cd12a5adae9184188f6d0fb52b84c0.zip
external_llvm-195a0ce484cd12a5adae9184188f6d0fb52b84c0.tar.gz
external_llvm-195a0ce484cd12a5adae9184188f6d0fb52b84c0.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119777 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCELFStreamer.cpp')
-rw-r--r--lib/MC/MCELFStreamer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/MC/MCELFStreamer.cpp b/lib/MC/MCELFStreamer.cpp
index 75e58de..cac4817 100644
--- a/lib/MC/MCELFStreamer.cpp
+++ b/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(),