Make it possible for the MCObjectWriter to decide if a given fixup is fully
[oota-llvm.git] / include / llvm / MC / MCObjectWriter.h
index 70535206aac7ae2e7c134818599254f1cf7f4741..7de37f762d365ea8c44efa95352bcb6d51ef58b9 100644 (file)
@@ -15,9 +15,9 @@
 #include <cassert>
 
 namespace llvm {
-class MCAsmFixup;
 class MCAsmLayout;
 class MCAssembler;
+class MCFixup;
 class MCFragment;
 class MCValue;
 class raw_ostream;
@@ -72,9 +72,19 @@ public:
   virtual void RecordRelocation(const MCAssembler &Asm,
                                 const MCAsmLayout &Layout,
                                 const MCFragment *Fragment,
-                                const MCAsmFixup &Fixup, MCValue Target,
+                                const MCFixup &Fixup, MCValue Target,
                                 uint64_t &FixedValue) = 0;
 
+  /// Check if a fixup is fully resolved.
+  ///
+  /// This routine is used by the assembler to let the file format decide
+  /// if a fixup is not fully resolved. For example, one that crosses
+  /// two sections on ELF.
+  virtual bool IsFixupFullyResolved(const MCAssembler &Asm,
+                                    const MCValue Target,
+                                    bool IsPCRel,
+                                    const MCFragment *DF) const = 0;
+
   /// Write the object file.
   ///
   /// This routine is called by the assembler after layout and relaxation is
@@ -162,6 +172,8 @@ public:
   /// @}
 };
 
+MCObjectWriter *createWinCOFFObjectWriter(raw_ostream &OS, bool is64Bit);
+
 } // End llvm namespace
 
 #endif