mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-25 16:29:20 +00:00
Most streamers' InitSections just create a text section. Make that the default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199969 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
61e4d529fe
commit
b385559db9
@ -342,7 +342,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// InitSections - Create the default sections and set the initial one.
|
/// InitSections - Create the default sections and set the initial one.
|
||||||
virtual void InitSections() = 0;
|
virtual void InitSections();
|
||||||
|
|
||||||
/// AssignSection - Sets the symbol's section.
|
/// AssignSection - Sets the symbol's section.
|
||||||
///
|
///
|
||||||
|
@ -663,9 +663,6 @@ namespace {
|
|||||||
// Noop calls.
|
// Noop calls.
|
||||||
virtual void ChangeSection(const MCSection *Section,
|
virtual void ChangeSection(const MCSection *Section,
|
||||||
const MCExpr *Subsection) {}
|
const MCExpr *Subsection) {}
|
||||||
virtual void InitSections() {
|
|
||||||
SwitchSection(getContext().getObjectFileInfo()->getTextSection());
|
|
||||||
}
|
|
||||||
virtual void EmitAssemblerFlag(MCAssemblerFlag Flag) {}
|
virtual void EmitAssemblerFlag(MCAssemblerFlag Flag) {}
|
||||||
virtual void EmitThumbFunc(MCSymbol *Func) {}
|
virtual void EmitThumbFunc(MCSymbol *Func) {}
|
||||||
virtual void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) {}
|
virtual void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) {}
|
||||||
|
@ -128,10 +128,6 @@ public:
|
|||||||
virtual void ChangeSection(const MCSection *Section,
|
virtual void ChangeSection(const MCSection *Section,
|
||||||
const MCExpr *Subsection);
|
const MCExpr *Subsection);
|
||||||
|
|
||||||
virtual void InitSections() {
|
|
||||||
SwitchSection(getContext().getObjectFileInfo()->getTextSection());
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void EmitLabel(MCSymbol *Symbol);
|
virtual void EmitLabel(MCSymbol *Symbol);
|
||||||
virtual void EmitDebugLabel(MCSymbol *Symbol);
|
virtual void EmitDebugLabel(MCSymbol *Symbol);
|
||||||
|
|
||||||
|
@ -43,7 +43,6 @@ public:
|
|||||||
/// @name MCStreamer Interface
|
/// @name MCStreamer Interface
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
virtual void InitSections();
|
|
||||||
virtual void EmitLabel(MCSymbol *Symbol);
|
virtual void EmitLabel(MCSymbol *Symbol);
|
||||||
virtual void EmitDebugLabel(MCSymbol *Symbol);
|
virtual void EmitDebugLabel(MCSymbol *Symbol);
|
||||||
virtual void EmitEHSymAttributes(const MCSymbol *Symbol,
|
virtual void EmitEHSymAttributes(const MCSymbol *Symbol,
|
||||||
@ -94,10 +93,6 @@ public:
|
|||||||
|
|
||||||
} // end anonymous namespace.
|
} // end anonymous namespace.
|
||||||
|
|
||||||
void MCMachOStreamer::InitSections() {
|
|
||||||
SwitchSection(getContext().getObjectFileInfo()->getTextSection());
|
|
||||||
}
|
|
||||||
|
|
||||||
void MCMachOStreamer::EmitEHSymAttributes(const MCSymbol *Symbol,
|
void MCMachOStreamer::EmitEHSymAttributes(const MCSymbol *Symbol,
|
||||||
MCSymbol *EHSymbol) {
|
MCSymbol *EHSymbol) {
|
||||||
MCSymbolData &SD =
|
MCSymbolData &SD =
|
||||||
|
@ -24,9 +24,6 @@ namespace {
|
|||||||
/// @name MCStreamer Interface
|
/// @name MCStreamer Interface
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
virtual void InitSections() {
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void ChangeSection(const MCSection *Section,
|
virtual void ChangeSection(const MCSection *Section,
|
||||||
const MCExpr *Subsection) {
|
const MCExpr *Subsection) {
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,6 @@ public:
|
|||||||
/// @name MCStreamer Interface
|
/// @name MCStreamer Interface
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
virtual void InitSections();
|
|
||||||
virtual void EmitLabel(MCSymbol *Symbol);
|
virtual void EmitLabel(MCSymbol *Symbol);
|
||||||
virtual void EmitDebugLabel(MCSymbol *Symbol);
|
virtual void EmitDebugLabel(MCSymbol *Symbol);
|
||||||
virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0,
|
virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0,
|
||||||
@ -104,10 +103,6 @@ public:
|
|||||||
|
|
||||||
} // end anonymous namespace.
|
} // end anonymous namespace.
|
||||||
|
|
||||||
void MCPureStreamer::InitSections() {
|
|
||||||
SwitchSection(getContext().getObjectFileInfo()->getTextSection());
|
|
||||||
}
|
|
||||||
|
|
||||||
void MCPureStreamer::EmitLabel(MCSymbol *Symbol) {
|
void MCPureStreamer::EmitLabel(MCSymbol *Symbol) {
|
||||||
assert(Symbol->isUndefined() && "Cannot define a symbol twice!");
|
assert(Symbol->isUndefined() && "Cannot define a symbol twice!");
|
||||||
assert(!Symbol->isVariable() && "Cannot emit a variable symbol!");
|
assert(!Symbol->isVariable() && "Cannot emit a variable symbol!");
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#include "llvm/MC/MCAsmInfo.h"
|
#include "llvm/MC/MCAsmInfo.h"
|
||||||
#include "llvm/MC/MCContext.h"
|
#include "llvm/MC/MCContext.h"
|
||||||
#include "llvm/MC/MCExpr.h"
|
#include "llvm/MC/MCExpr.h"
|
||||||
|
#include "llvm/MC/MCObjectFileInfo.h"
|
||||||
#include "llvm/MC/MCObjectWriter.h"
|
#include "llvm/MC/MCObjectWriter.h"
|
||||||
#include "llvm/MC/MCSymbol.h"
|
#include "llvm/MC/MCSymbol.h"
|
||||||
#include "llvm/Support/ErrorHandling.h"
|
#include "llvm/Support/ErrorHandling.h"
|
||||||
@ -200,6 +201,10 @@ void MCStreamer::EmitEHSymAttributes(const MCSymbol *Symbol,
|
|||||||
MCSymbol *EHSymbol) {
|
MCSymbol *EHSymbol) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MCStreamer::InitSections() {
|
||||||
|
SwitchSection(getContext().getObjectFileInfo()->getTextSection());
|
||||||
|
}
|
||||||
|
|
||||||
void MCStreamer::AssignSection(MCSymbol *Symbol, const MCSection *Section) {
|
void MCStreamer::AssignSection(MCSymbol *Symbol, const MCSection *Section) {
|
||||||
if (Section)
|
if (Section)
|
||||||
Symbol->setSection(*Section);
|
Symbol->setSection(*Section);
|
||||||
|
Loading…
Reference in New Issue
Block a user