Don't return error_code from function that never fails.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241021 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-06-29 23:29:12 +00:00
parent 10e9fb18d4
commit ff67629985
23 changed files with 49 additions and 106 deletions

View File

@@ -51,7 +51,7 @@ public:
void moveNext();
std::error_code getAddress(uint64_t &Result) const;
std::error_code getOffset(uint64_t &Result) const;
uint64_t getOffset() const;
symbol_iterator getSymbol() const;
std::error_code getType(uint64_t &Result) const;
@@ -240,8 +240,7 @@ protected:
virtual void moveRelocationNext(DataRefImpl &Rel) const = 0;
virtual std::error_code getRelocationAddress(DataRefImpl Rel,
uint64_t &Res) const = 0;
virtual std::error_code getRelocationOffset(DataRefImpl Rel,
uint64_t &Res) const = 0;
virtual uint64_t getRelocationOffset(DataRefImpl Rel) const = 0;
virtual symbol_iterator getRelocationSymbol(DataRefImpl Rel) const = 0;
virtual std::error_code getRelocationType(DataRefImpl Rel,
uint64_t &Res) const = 0;
@@ -457,8 +456,8 @@ inline std::error_code RelocationRef::getAddress(uint64_t &Result) const {
return OwningObject->getRelocationAddress(RelocationPimpl, Result);
}
inline std::error_code RelocationRef::getOffset(uint64_t &Result) const {
return OwningObject->getRelocationOffset(RelocationPimpl, Result);
inline uint64_t RelocationRef::getOffset() const {
return OwningObject->getRelocationOffset(RelocationPimpl);
}
inline symbol_iterator RelocationRef::getSymbol() const {