summaryrefslogtreecommitdiff
path: root/include/llvm/Object/COFF.h
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-09-14 01:22:52 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-09-14 01:22:52 +0000
commitac241fe9f0d73c6f632e4f7f89e06b698d39da54 (patch)
treee71fc30544149236a5be84d090cc58672b9b39db /include/llvm/Object/COFF.h
parent357b5718411c4a15427d69590651fb8103ae7ba9 (diff)
downloadllvm-ac241fe9f0d73c6f632e4f7f89e06b698d39da54.tar.gz
llvm-ac241fe9f0d73c6f632e4f7f89e06b698d39da54.tar.bz2
llvm-ac241fe9f0d73c6f632e4f7f89e06b698d39da54.tar.xz
Object: make the following changes into SymbolRef
- Add enum SymbolType and function getSymbolType() - Add function isGlobal() - it's returns true for symbols that can be used in another objects, such as library functions. - Rename function getAddress() to getOffset() and add new function getAddress(), because currently getAddress() returns section offset of symbol first byte. new getAddress() return symbol address. - Change usage SymbolRef::getAddress() to getOffset() in tools/llvm-nm and tools/llvm-objdump. Patch by Danil Malyshev! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139683 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Object/COFF.h')
-rw-r--r--include/llvm/Object/COFF.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/Object/COFF.h b/include/llvm/Object/COFF.h
index 1663caf60b..d604b02d75 100644
--- a/include/llvm/Object/COFF.h
+++ b/include/llvm/Object/COFF.h
@@ -92,10 +92,13 @@ private:
protected:
virtual error_code getSymbolNext(DataRefImpl Symb, SymbolRef &Res) const;
virtual error_code getSymbolName(DataRefImpl Symb, StringRef &Res) const;
+ virtual error_code getSymbolOffset(DataRefImpl Symb, uint64_t &Res) const;
virtual error_code getSymbolAddress(DataRefImpl Symb, uint64_t &Res) const;
virtual error_code getSymbolSize(DataRefImpl Symb, uint64_t &Res) const;
virtual error_code getSymbolNMTypeChar(DataRefImpl Symb, char &Res) const;
virtual error_code isSymbolInternal(DataRefImpl Symb, bool &Res) const;
+ virtual error_code isSymbolGlobal(DataRefImpl Symb, bool &Res) const;
+ virtual error_code getSymbolType(DataRefImpl Symb, SymbolRef::SymbolType &Res) const;
virtual error_code getSectionNext(DataRefImpl Sec, SectionRef &Res) const;
virtual error_code getSectionName(DataRefImpl Sec, StringRef &Res) const;