[opaque pointer type]: Pass explicit pointee type when building a constant GEP.
[oota-llvm.git] / include / llvm / Object / MachO.h
index 7ec5f0756e998c36ec120880aef87aafde5a765e..47d018d3a5ea6e9c72dbeefafabbec8e244222a1 100644 (file)
@@ -206,13 +206,11 @@ public:
   unsigned getSectionType(SectionRef Sec) const;
 
   ErrorOr<uint64_t> getSymbolAddress(DataRefImpl Symb) const override;
-  uint64_t getSymbolValue(DataRefImpl Symb) const override;
   uint32_t getSymbolAlignment(DataRefImpl Symb) const override;
   uint64_t getCommonSymbolSizeImpl(DataRefImpl Symb) const override;
   SymbolRef::Type getSymbolType(DataRefImpl Symb) const override;
   uint32_t getSymbolFlags(DataRefImpl Symb) const override;
-  std::error_code getSymbolSection(DataRefImpl Symb,
-                                   section_iterator &Res) const override;
+  ErrorOr<section_iterator> getSymbolSection(DataRefImpl Symb) const override;
   unsigned getSymbolSectionID(SymbolRef Symb) const;
   unsigned getSectionID(SectionRef Sec) const;
 
@@ -232,7 +230,6 @@ public:
   relocation_iterator section_rel_end(DataRefImpl Sec) const override;
 
   void moveRelocationNext(DataRefImpl &Rel) const override;
-  ErrorOr<uint64_t> getRelocationAddress(DataRefImpl Rel) const override;
   uint64_t getRelocationOffset(DataRefImpl Rel) const override;
   symbol_iterator getRelocationSymbol(DataRefImpl Rel) const override;
   section_iterator getRelocationSection(DataRefImpl Rel) const;
@@ -244,6 +241,8 @@ public:
   // MachO specific.
   std::error_code getLibraryShortNameByIndex(unsigned Index, StringRef &) const;
 
+  section_iterator getRelocationRelocatedSection(relocation_iterator Rel) const;
+
   // TODO: Would be useful to have an iterator based version
   // of the load command interface too.
 
@@ -424,6 +423,8 @@ public:
   }
 
 private:
+  uint64_t getSymbolValueImpl(DataRefImpl Symb) const override;
+
   union {
     MachO::mach_header_64 Header64;
     MachO::mach_header Header;