summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCDwarf.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-04-01 08:07:52 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-04-01 08:07:52 +0000
commit3464161070a8606f261b0fd2377ed02f6f7187a5 (patch)
tree93036355b76b3325b3672535d6535e7f8df720ae /llvm/lib/MC/MCDwarf.cpp
parent8bf66c4f3ff38bfe50a2855a7e48fc8d4bd026a5 (diff)
downloadbcm5719-llvm-3464161070a8606f261b0fd2377ed02f6f7187a5.tar.gz
bcm5719-llvm-3464161070a8606f261b0fd2377ed02f6f7187a5.zip
DebugInfo: Avoid creating unnecessary/empty line tables and remove the special case of '0' in DwarfCompileUnit::initStmtList by just always using a label difference
This moves one case of raw text checking down into the MCStreamer interfaces in the form of a virtual function, even if we ultimately end up consolidating on the one-or-many line tables issue one day, this is nicer in the interim. This just generally streamlines a bunch of use cases into a common code path. llvm-svn: 205287
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r--llvm/lib/MC/MCDwarf.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index 231948eaff5..72836ff32ec 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/lib/MC/MCDwarf.cpp
@@ -788,10 +788,8 @@ void MCGenDwarfInfo::Emit(MCStreamer *MCOS) {
bool CreateDwarfSectionSymbols =
AsmInfo->doesDwarfUseRelocationsAcrossSections();
MCSymbol *LineSectionSymbol = nullptr;
- if (CreateDwarfSectionSymbols) {
- LineSectionSymbol = context.CreateTempSymbol();
- context.setMCLineTableSymbol(LineSectionSymbol, 0);
- }
+ if (CreateDwarfSectionSymbols)
+ LineSectionSymbol = MCOS->getDwarfLineTableSymbol(0);
MCSymbol *AbbrevSectionSymbol = NULL;
MCSymbol *InfoSectionSymbol = NULL;
MCOS->SwitchSection(context.getObjectFileInfo()->getDwarfInfoSection());
OpenPOWER on IntegriCloud