Move HasInstructions to MCSection.
[oota-llvm.git] / lib / MC / MCObjectStreamer.cpp
index b244c3a679c1995dd0686f9f67a8cbd4f961b6cd..8584a79a8d13fcd6830fb58dd918ec85167c1df8 100644 (file)
@@ -230,12 +230,16 @@ void MCObjectStreamer::EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) {
   MCStreamer::EmitAssignment(Symbol, Value);
 }
 
+bool MCObjectStreamer::mayHaveInstructions(MCSection &Sec) const {
+  return Sec.hasInstructions();
+}
+
 void MCObjectStreamer::EmitInstruction(const MCInst &Inst,
                                        const MCSubtargetInfo &STI) {
   MCStreamer::EmitInstruction(Inst, STI);
 
   MCSectionData *SD = getCurrentSectionData();
-  SD->setHasInstructions(true);
+  SD->getSection().setHasInstructions(true);
 
   // Now that a machine instruction has been assembled into this section, make
   // a line entry for any .loc directive that has been seen.