Replace OwningPtr<T> with std::unique_ptr<T>.
[oota-llvm.git] / include / llvm / MC / MCObjectSymbolizer.h
index 7d70dfd56b89b4a1f692b04fd1f05d71d8b7f1cc..6f14b561c06ac94e0258398e36cda1a63aba6850 100644 (file)
@@ -41,7 +41,7 @@ protected:
   const object::RelocationRef *findRelocationAt(uint64_t Addr);
   const object::SectionRef *findSectionContaining(uint64_t Addr);
 
-  MCObjectSymbolizer(MCContext &Ctx, OwningPtr<MCRelocationInfo> &RelInfo,
+  MCObjectSymbolizer(MCContext &Ctx, std::unique_ptr<MCRelocationInfo> &RelInfo,
                      const object::ObjectFile *Obj);
 
 public:
@@ -56,10 +56,16 @@ public:
                                        int64_t Value, uint64_t Address);
   /// @}
 
+  /// \brief Look for an external function symbol at \p Addr.
+  /// (References through the ELF PLT, Mach-O stubs, and similar).
+  /// \returns An MCExpr representing the external symbol, or 0 if not found.
+  virtual StringRef findExternalFunctionAt(uint64_t Addr);
+
   /// \brief Create an object symbolizer for \p Obj.
   static MCObjectSymbolizer *
-    createObjectSymbolizer(MCContext &Ctx, OwningPtr<MCRelocationInfo> &RelInfo,
-                           const object::ObjectFile *Obj);
+  createObjectSymbolizer(MCContext &Ctx,
+                         std::unique_ptr<MCRelocationInfo> &RelInfo,
+                         const object::ObjectFile *Obj);
 
 private:
   typedef DenseMap<uint64_t, object::RelocationRef> AddrToRelocMap;