mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 02:25:19 +00:00
Print section start labels when first switching to the section.
This is less brittle and avoids polluting the start of the file with every debug section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231898 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "llvm/MC/MCExpr.h"
|
||||
#include "llvm/MC/MCObjectFileInfo.h"
|
||||
#include "llvm/MC/MCObjectWriter.h"
|
||||
#include "llvm/MC/MCSection.h"
|
||||
#include "llvm/MC/MCSymbol.h"
|
||||
#include "llvm/MC/MCWin64EH.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
@@ -670,5 +671,8 @@ void MCStreamer::SwitchSection(const MCSection *Section,
|
||||
if (MCSectionSubPair(Section, Subsection) != curSection) {
|
||||
SectionStack.back().first = MCSectionSubPair(Section, Subsection);
|
||||
ChangeSection(Section, Subsection);
|
||||
MCSymbol *Sym = Section->getBeginSymbol();
|
||||
if (Sym && !Sym->isInSection())
|
||||
EmitLabel(Sym);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user