Implement containsSymbol with other lower level methods.

llvm-svn: 241112
This commit is contained in:
Rafael Espindola
2015-06-30 20:18:49 +00:00
parent b138ae7cac
commit e9c58c7469
7 changed files with 7 additions and 44 deletions

View File

@@ -28,6 +28,13 @@ void ObjectFile::anchor() { }
ObjectFile::ObjectFile(unsigned int Type, MemoryBufferRef Source)
: SymbolicFile(Type, Source) {}
bool SectionRef::containsSymbol(SymbolRef S) const {
section_iterator SymSec = getObject()->section_end();
if (S.getSection(SymSec))
return false;
return *this == *SymSec;
}
std::error_code ObjectFile::printSymbolName(raw_ostream &OS,
DataRefImpl Symb) const {
StringRef Name;