[PGO] convert a subset of C++ interfaces into C (for sharing) (NFC)
[oota-llvm.git] / include / llvm / MC / MCAsmBackend.h
index c0a95d48e370e4ca899aab2f7a4eb48b94c0b4c4..51312ff80447e3b88cde5c6716359cd0a6819066 100644 (file)
@@ -67,6 +67,11 @@ public:
   /// Get the number of target specific fixup kinds.
   virtual unsigned getNumFixupKinds() const = 0;
 
+  /// Map a relocation name used in .reloc to a fixup kind.
+  /// Returns true and sets MappedKind if Name is successfully mapped.
+  /// Otherwise returns false and leaves MappedKind unchanged.
+  virtual bool getFixupKind(StringRef Name, MCFixupKind &MappedKind) const;
+
   /// Get information on a fixup kind.
   virtual const MCFixupKindInfo &getFixupKindInfo(MCFixupKind Kind) const;
 
@@ -97,6 +102,12 @@ public:
 
   /// Target specific predicate for whether a given fixup requires the
   /// associated instruction to be relaxed.
+  virtual bool fixupNeedsRelaxationAdvanced(const MCFixup &Fixup, bool Resolved,
+                                            uint64_t Value,
+                                            const MCRelaxableFragment *DF,
+                                            const MCAsmLayout &Layout) const;
+
+  /// Simple predicate for targets where !Resolved implies requiring relaxation
   virtual bool fixupNeedsRelaxation(const MCFixup &Fixup, uint64_t Value,
                                     const MCRelaxableFragment *DF,
                                     const MCAsmLayout &Layout) const = 0;