Simplify the logic for deciding when to initialize the sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199971 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2014-01-24 03:54:40 +00:00
parent b385559db9
commit a1f7c26cc8
8 changed files with 17 additions and 24 deletions

View File

@@ -157,8 +157,6 @@ class MCStreamer {
/// values saved by PushSection.
SmallVector<std::pair<MCSectionSubPair, MCSectionSubPair>, 4> SectionStack;
bool AutoInitSections;
protected:
MCStreamer(MCContext &Ctx, MCTargetStreamer *TargetStreamer);
@@ -330,19 +328,11 @@ public:
SectionStack.back().first = MCSectionSubPair(Section, Subsection);
}
/// Initialize the streamer.
void InitStreamer() {
if (AutoInitSections)
InitSections();
}
/// Tell this MCStreamer to call InitSections upon initialization.
void setAutoInitSections(bool AutoInitSections) {
this->AutoInitSections = AutoInitSections;
}
/// InitSections - Create the default sections and set the initial one.
virtual void InitSections();
/// Create the default sections and set the initial one.
///
/// @param Force - If false, a text streamer implementation can be a nop.
/// Used by CodeGen to avoid starting every file with '.text'.
virtual void InitSections(bool Force = true);
/// AssignSection - Sets the symbol's section.
///