uselistorder: Pull bit through BitcodeWriterPass
[oota-llvm.git] / include / llvm / MC / MCObjectStreamer.h
index 3538f733dc72cdf9702a18b6b6f7e4dcd72bf530..6666a503ea8ad74065c0c19d2f00e4b60b86e117 100644 (file)
@@ -24,6 +24,7 @@ class MCFragment;
 class MCDataFragment;
 class MCAsmBackend;
 class raw_ostream;
+class raw_pwrite_stream;
 
 /// \brief Streaming object file generation interface.
 ///
@@ -44,14 +45,10 @@ class MCObjectStreamer : public MCStreamer {
   void EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame) override;
   void EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame) override;
 
-  // If any labels have been emitted but not assigned fragments, ensure that
-  // they get assigned, either to F if possible or to a new data fragment.
-  void flushPendingLabels(MCFragment *F);
-
 protected:
-  MCObjectStreamer(MCContext &Context, MCAsmBackend &TAB, raw_ostream &OS,
+  MCObjectStreamer(MCContext &Context, MCAsmBackend &TAB, raw_pwrite_stream &OS,
                    MCCodeEmitter *Emitter);
-  ~MCObjectStreamer();
+  ~MCObjectStreamer() override;
 
 public:
   /// state management
@@ -85,6 +82,12 @@ protected:
 
   bool changeSectionImpl(const MCSection *Section, const MCExpr *Subsection);
 
+  /// If any labels have been emitted but not assigned fragments, ensure that
+  /// they get assigned, either to F if possible or to a new data fragment.
+  /// Optionally, it is also possible to provide an offset \p FOffset, which
+  /// will be used as a symbol offset within the fragment.
+  void flushPendingLabels(MCFragment *F, uint64_t FOffset = 0);
+
 public:
   void visitUsedSymbol(const MCSymbol &Sym) override;