llvm.org GIT mirror llvm / b385559
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 Rafael Espindola 6 years ago
7 changed file(s) with 6 addition(s) and 21 deletion(s). Raw diff Collapse all Expand all
341341 }
342342
343343 /// InitSections - Create the default sections and set the initial one.
344 virtual void InitSections() = 0;
344 virtual void InitSections();
345345
346346 /// AssignSection - Sets the symbol's section.
347347 ///
662662 // Noop calls.
663663 virtual void ChangeSection(const MCSection *Section,
664664 const MCExpr *Subsection) {}
665 virtual void InitSections() {
666 SwitchSection(getContext().getObjectFileInfo()->getTextSection());
667 }
668665 virtual void EmitAssemblerFlag(MCAssemblerFlag Flag) {}
669666 virtual void EmitThumbFunc(MCSymbol *Func) {}
670667 virtual void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) {}
126126
127127 virtual void ChangeSection(const MCSection *Section,
128128 const MCExpr *Subsection);
129
130 virtual void InitSections() {
131 SwitchSection(getContext().getObjectFileInfo()->getTextSection());
132 }
133129
134130 virtual void EmitLabel(MCSymbol *Symbol);
135131 virtual void EmitDebugLabel(MCSymbol *Symbol);
4242 /// @name MCStreamer Interface
4343 /// @{
4444
45 virtual void InitSections();
4645 virtual void EmitLabel(MCSymbol *Symbol);
4746 virtual void EmitDebugLabel(MCSymbol *Symbol);
4847 virtual void EmitEHSymAttributes(const MCSymbol *Symbol,
9291 };
9392
9493 } // end anonymous namespace.
95
96 void MCMachOStreamer::InitSections() {
97 SwitchSection(getContext().getObjectFileInfo()->getTextSection());
98 }
9994
10095 void MCMachOStreamer::EmitEHSymAttributes(const MCSymbol *Symbol,
10196 MCSymbol *EHSymbol) {
2222
2323 /// @name MCStreamer Interface
2424 /// @{
25
26 virtual void InitSections() {
27 }
2825
2926 virtual void ChangeSection(const MCSection *Section,
3027 const MCExpr *Subsection) {
3333 /// @name MCStreamer Interface
3434 /// @{
3535
36 virtual void InitSections();
3736 virtual void EmitLabel(MCSymbol *Symbol);
3837 virtual void EmitDebugLabel(MCSymbol *Symbol);
3938 virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0,
103102
104103 } // end anonymous namespace.
105104
106 void MCPureStreamer::InitSections() {
107 SwitchSection(getContext().getObjectFileInfo()->getTextSection());
108 }
109
110105 void MCPureStreamer::EmitLabel(MCSymbol *Symbol) {
111106 assert(Symbol->isUndefined() && "Cannot define a symbol twice!");
112107 assert(!Symbol->isVariable() && "Cannot emit a variable symbol!");
1313 #include "llvm/MC/MCAsmInfo.h"
1414 #include "llvm/MC/MCContext.h"
1515 #include "llvm/MC/MCExpr.h"
16 #include "llvm/MC/MCObjectFileInfo.h"
1617 #include "llvm/MC/MCObjectWriter.h"
1718 #include "llvm/MC/MCSymbol.h"
1819 #include "llvm/Support/ErrorHandling.h"
199200 MCSymbol *EHSymbol) {
200201 }
201202
203 void MCStreamer::InitSections() {
204 SwitchSection(getContext().getObjectFileInfo()->getTextSection());
205 }
206
202207 void MCStreamer::AssignSection(MCSymbol *Symbol, const MCSection *Section) {
203208 if (Section)
204209 Symbol->setSection(*Section);