Implement containsSymbol with other lower level methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241112 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-06-30 20:18:49 +00:00
parent ce772898d6
commit d231306ba8
7 changed files with 7 additions and 44 deletions

View File

@ -567,21 +567,6 @@ bool MachOObjectFile::isSectionVirtual(DataRefImpl Sec) const {
return false;
}
bool MachOObjectFile::sectionContainsSymbol(DataRefImpl Sec,
DataRefImpl Symb) const {
SymbolRef::Type ST = getSymbolType(Symb);
if (ST == SymbolRef::ST_Unknown)
return false;
uint64_t SectBegin = getSectionAddress(Sec);
uint64_t SectEnd = getSectionSize(Sec);
SectEnd += SectBegin;
uint64_t SymAddr;
getSymbolAddress(Symb, SymAddr);
return (SymAddr >= SectBegin) && (SymAddr < SectEnd);
}
relocation_iterator MachOObjectFile::section_rel_begin(DataRefImpl Sec) const {
DataRefImpl Ret;
Ret.d.a = Sec.d.a;