Change getRelocationAdditionalInfo to be ELF only.

It was only implemented for ELF where it collected the Addend, so this
patch also renames it to getRelocationAddend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181502 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2013-05-09 03:39:05 +00:00
parent c496875f0c
commit 167957fa09
10 changed files with 65 additions and 59 deletions

View File

@@ -119,7 +119,6 @@ public:
///
/// This is for display purposes only.
error_code getTypeName(SmallVectorImpl<char> &Result) const;
error_code getAdditionalInfo(int64_t &Result) const;
/// @brief Get a string that represents the calculation of the value of this
/// relocation.
@@ -128,6 +127,7 @@ public:
error_code getValueString(SmallVectorImpl<char> &Result) const;
DataRefImpl getRawDataRefImpl() const;
const ObjectFile *getObjectFile() const;
};
typedef content_iterator<RelocationRef> relocation_iterator;
@@ -342,8 +342,6 @@ protected:
uint64_t &Res) const = 0;
virtual error_code getRelocationTypeName(DataRefImpl Rel,
SmallVectorImpl<char> &Result) const = 0;
virtual error_code getRelocationAdditionalInfo(DataRefImpl Rel,
int64_t &Res) const = 0;
virtual error_code getRelocationValueString(DataRefImpl Rel,
SmallVectorImpl<char> &Result) const = 0;
virtual error_code getRelocationHidden(DataRefImpl Rel, bool &Result) const {
@@ -579,10 +577,6 @@ inline error_code RelocationRef::getTypeName(SmallVectorImpl<char> &Result)
return OwningObject->getRelocationTypeName(RelocationPimpl, Result);
}
inline error_code RelocationRef::getAdditionalInfo(int64_t &Result) const {
return OwningObject->getRelocationAdditionalInfo(RelocationPimpl, Result);
}
inline error_code RelocationRef::getValueString(SmallVectorImpl<char> &Result)
const {
return OwningObject->getRelocationValueString(RelocationPimpl, Result);
@@ -596,6 +590,10 @@ inline DataRefImpl RelocationRef::getRawDataRefImpl() const {
return RelocationPimpl;
}
inline const ObjectFile *RelocationRef::getObjectFile() const {
return OwningObject;
}
// Inline function definitions.
inline LibraryRef::LibraryRef(DataRefImpl LibraryP, const ObjectFile *Owner)
: LibraryPimpl(LibraryP)