X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FObject%2FObjectFile.cpp;h=e850d3f189b0a708c2f987cc22542bfed9130da7;hp=f6667d9ea6aa52efda8585ec74c487b788d02792;hb=d231306ba889fde60e9128253404c3d2e06bf4eb;hpb=ce772898d69c82e634df5c77b4037fbd968049ea diff --git a/lib/Object/ObjectFile.cpp b/lib/Object/ObjectFile.cpp index f6667d9ea6a..e850d3f189b 100644 --- a/lib/Object/ObjectFile.cpp +++ b/lib/Object/ObjectFile.cpp @@ -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;