diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-30 20:18:49 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-30 20:18:49 +0000 |
commit | e9c58c74698a99f0102bd1a134937876565f2d3c (patch) | |
tree | 48477c5d0016b2816e14dbb8b06bb386d3b67d42 /llvm/lib/Object/ObjectFile.cpp | |
parent | b138ae7cacf1732a2a03a6d71dc086ae77d4c49f (diff) | |
download | bcm5719-llvm-e9c58c74698a99f0102bd1a134937876565f2d3c.tar.gz bcm5719-llvm-e9c58c74698a99f0102bd1a134937876565f2d3c.zip |
Implement containsSymbol with other lower level methods.
llvm-svn: 241112
Diffstat (limited to 'llvm/lib/Object/ObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/ObjectFile.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Object/ObjectFile.cpp b/llvm/lib/Object/ObjectFile.cpp index f6667d9ea6a..e850d3f189b 100644 --- a/llvm/lib/Object/ObjectFile.cpp +++ b/llvm/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; |