llvm.org GIT mirror llvm / 5950c6f
Inline functions that are only called once. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199965 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 6 years ago
2 changed file(s) with 10 addition(s) and 23 deletion(s). Raw diff Collapse all Expand all
105105 std::vector LocalCommons;
106106
107107 SmallPtrSet BindingExplicitlySet;
108
109 void SetSectionData();
110 void SetSectionText();
111 void SetSectionBss();
112108 };
113109
114110 MCELFStreamer *createARMELFStreamer(MCContext &Context, MCAsmBackend &TAB,
3434
3535 using namespace llvm;
3636
37 inline void MCELFStreamer::SetSectionData() {
38 SwitchSection(getContext().getObjectFileInfo()->getDataSection());
39 EmitCodeAlignment(4, 0);
40 }
41
42 inline void MCELFStreamer::SetSectionText() {
43 SwitchSection(getContext().getObjectFileInfo()->getTextSection());
44 EmitCodeAlignment(4, 0);
45 }
46
47 inline void MCELFStreamer::SetSectionBss() {
48 SwitchSection(getContext().getObjectFileInfo()->getBSSSection());
49 EmitCodeAlignment(4, 0);
50 }
51
5237 MCELFStreamer::~MCELFStreamer() {
5338 }
5439
5540 void MCELFStreamer::InitSections() {
5641 // This emulates the same behavior of GNU as. This makes it easier
5742 // to compare the output as the major sections are in the same order.
58 SetSectionText();
59 SetSectionData();
60 SetSectionBss();
61 SetSectionText();
43 SwitchSection(getContext().getObjectFileInfo()->getTextSection());
44 EmitCodeAlignment(4, 0);
45
46 SwitchSection(getContext().getObjectFileInfo()->getDataSection());
47 EmitCodeAlignment(4, 0);
48
49 SwitchSection(getContext().getObjectFileInfo()->getBSSSection());
50 EmitCodeAlignment(4, 0);
51
52 SwitchSection(getContext().getObjectFileInfo()->getTextSection());
6253 }
6354
6455 void MCELFStreamer::EmitLabel(MCSymbol *Symbol) {