Return ErrorOr from getSymbolAddress.
[oota-llvm.git] / include / llvm / Object / MachO.h
index f4edfd057303ee488845012f0ed58885dee0463e..7ec5f0756e998c36ec120880aef87aafde5a765e 100644 (file)
@@ -205,8 +205,7 @@ public:
   std::error_code getIndirectName(DataRefImpl Symb, StringRef &Res) const;
   unsigned getSectionType(SectionRef Sec) const;
 
-  std::error_code getSymbolAddress(DataRefImpl Symb,
-                                   uint64_t &Res) const override;
+  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;