llvm.org GIT mirror llvm / 3a89110
InitToTextSection is redundant with InitSections. Remove it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199955 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 6 years ago
11 changed file(s) with 2 addition(s) and 33 deletion(s). Raw diff Collapse all Expand all
4545 /// @{
4646
4747 virtual void InitSections();
48 virtual void InitToTextSection();
4948 virtual void ChangeSection(const MCSection *Section,
5049 const MCExpr *Subsection);
5150 virtual void EmitLabel(MCSymbol *Symbol);
342342
343343 /// InitSections - Create the default sections and set the initial one.
344344 virtual void InitSections() = 0;
345
346 /// InitToTextSection - Create a text section and switch the streamer to it.
347 virtual void InitToTextSection() = 0;
348345
349346 /// AssignSection - Sets the symbol's section.
350347 ///
685685 // Noop calls.
686686 virtual void ChangeSection(const MCSection *Section,
687687 const MCExpr *Subsection) {}
688 virtual void InitToTextSection() {}
689688 virtual void InitSections() {}
690689 virtual void EmitAssemblerFlag(MCAssemblerFlag Flag) {}
691690 virtual void EmitThumbFunc(MCSymbol *Func) {}
128128 const MCExpr *Subsection);
129129
130130 virtual void InitSections() {
131 InitToTextSection();
132 }
133
134 virtual void InitToTextSection() {
135131 SwitchSection(getContext().getObjectFileInfo()->getTextSection());
136132 }
137133
5050 }
5151
5252 MCELFStreamer::~MCELFStreamer() {
53 }
54
55 void MCELFStreamer::InitToTextSection() {
56 SetSectionText();
5753 }
5854
5955 void MCELFStreamer::InitSections() {
4343 /// @{
4444
4545 virtual void InitSections();
46 virtual void InitToTextSection();
4746 virtual void EmitLabel(MCSymbol *Symbol);
4847 virtual void EmitDebugLabel(MCSymbol *Symbol);
4948 virtual void EmitEHSymAttributes(const MCSymbol *Symbol,
9594 } // end anonymous namespace.
9695
9796 void MCMachOStreamer::InitSections() {
98 InitToTextSection();
99 }
100
101 void MCMachOStreamer::InitToTextSection() {
10297 SwitchSection(getContext().getObjectFileInfo()->getTextSection());
10398 }
10499
2222
2323 /// @name MCStreamer Interface
2424 /// @{
25
26 virtual void InitToTextSection() {
27 }
2825
2926 virtual void InitSections() {
3027 }
697697 void AsmParser::checkForValidSection() {
698698 if (!ParsingInlineAsm && !getStreamer().getCurrentSection().first) {
699699 TokError("expected section directive before assembly directive");
700 Out.InitToTextSection();
700 Out.InitSections();
701701 }
702702 }
703703
3434 /// @{
3535
3636 virtual void InitSections();
37 virtual void InitToTextSection();
3837 virtual void EmitLabel(MCSymbol *Symbol);
3938 virtual void EmitDebugLabel(MCSymbol *Symbol);
4039 virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0,
105104 } // end anonymous namespace.
106105
107106 void MCPureStreamer::InitSections() {
108 InitToTextSection();
109 }
110
111 void MCPureStreamer::InitToTextSection() {
112107 SwitchSection(getContext().getObjectFileInfo()->getTextSection());
113108 }
114109
5050 // MCStreamer interface
5151
5252 virtual void InitSections();
53 virtual void InitToTextSection();
5453 virtual void EmitLabel(MCSymbol *Symbol);
5554 virtual void EmitDebugLabel(MCSymbol *Symbol);
5655 virtual void EmitAssemblerFlag(MCAssemblerFlag Flag);
150149
151150 // MCStreamer interface
152151
153 void WinCOFFStreamer::InitToTextSection() {
154 SetSectionText();
155 }
156
157152 void WinCOFFStreamer::InitSections() {
158153 SetSectionText();
159154 SetSectionData();
88508850 }
88518851
88528852 if (!Section) {
8853 getStreamer().InitToTextSection();
8853 getStreamer().InitSections();
88548854 Section = getStreamer().getCurrentSection().first;
88558855 }
88568856