summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r--llvm/lib/MC/MCAsmStreamer.cpp5
-rw-r--r--llvm/lib/MC/MCELFStreamer.cpp2
-rw-r--r--llvm/lib/MC/MCStreamer.cpp5
-rw-r--r--llvm/lib/MC/WinCOFFStreamer.cpp4
4 files changed, 10 insertions, 6 deletions
diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp
index 96e14a9a863..f586db34e92 100644
--- a/llvm/lib/MC/MCAsmStreamer.cpp
+++ b/llvm/lib/MC/MCAsmStreamer.cpp
@@ -128,6 +128,11 @@ public:
virtual void ChangeSection(const MCSection *Section,
const MCExpr *Subsection);
+ virtual void InitSections(bool Force) {
+ if (Force)
+ SwitchSection(getContext().getObjectFileInfo()->getTextSection());
+ }
+
virtual void EmitLabel(MCSymbol *Symbol);
virtual void EmitDebugLabel(MCSymbol *Symbol);
diff --git a/llvm/lib/MC/MCELFStreamer.cpp b/llvm/lib/MC/MCELFStreamer.cpp
index d2c2395a7cf..8c9ad632135 100644
--- a/llvm/lib/MC/MCELFStreamer.cpp
+++ b/llvm/lib/MC/MCELFStreamer.cpp
@@ -38,7 +38,7 @@ using namespace llvm;
MCELFStreamer::~MCELFStreamer() {
}
-void MCELFStreamer::InitSections() {
+void MCELFStreamer::InitSections(bool Force) {
// This emulates the same behavior of GNU as. This makes it easier
// to compare the output as the major sections are in the same order.
SwitchSection(getContext().getObjectFileInfo()->getTextSection());
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp
index 10b2f3f9bd0..0b7c9067190 100644
--- a/llvm/lib/MC/MCStreamer.cpp
+++ b/llvm/lib/MC/MCStreamer.cpp
@@ -29,8 +29,7 @@ void MCTargetStreamer::emitLabel(MCSymbol *Symbol) {}
MCStreamer::MCStreamer(MCContext &Ctx, MCTargetStreamer *TargetStreamer)
: Context(Ctx), TargetStreamer(TargetStreamer), EmitEHFrame(true),
- EmitDebugFrame(false), CurrentW64UnwindInfo(0), LastSymbol(0),
- AutoInitSections(false) {
+ EmitDebugFrame(false), CurrentW64UnwindInfo(0), LastSymbol(0) {
SectionStack.push_back(std::pair<MCSectionSubPair, MCSectionSubPair>());
if (TargetStreamer)
TargetStreamer->setStreamer(this);
@@ -201,7 +200,7 @@ void MCStreamer::EmitEHSymAttributes(const MCSymbol *Symbol,
MCSymbol *EHSymbol) {
}
-void MCStreamer::InitSections() {
+void MCStreamer::InitSections(bool Force) {
SwitchSection(getContext().getObjectFileInfo()->getTextSection());
}
diff --git a/llvm/lib/MC/WinCOFFStreamer.cpp b/llvm/lib/MC/WinCOFFStreamer.cpp
index 6dbe518d1a2..3f7baf9038e 100644
--- a/llvm/lib/MC/WinCOFFStreamer.cpp
+++ b/llvm/lib/MC/WinCOFFStreamer.cpp
@@ -50,7 +50,7 @@ public:
// MCStreamer interface
- virtual void InitSections();
+ virtual void InitSections(bool Force);
virtual void EmitLabel(MCSymbol *Symbol);
virtual void EmitDebugLabel(MCSymbol *Symbol);
virtual void EmitAssemblerFlag(MCAssemblerFlag Flag);
@@ -123,7 +123,7 @@ void WinCOFFStreamer::AddCommonSymbol(MCSymbol *Symbol, uint64_t Size,
// MCStreamer interface
-void WinCOFFStreamer::InitSections() {
+void WinCOFFStreamer::InitSections(bool Force) {
// FIXME: this is identical to the ELF one.
// This emulates the same behavior of GNU as. This makes it easier
// to compare the output as the major sections are in the same order.
OpenPOWER on IntegriCloud