diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-10-17 23:53:37 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-10-17 23:53:37 +0000 |
commit | 4f91c2f2bd4ddc6af9ae58018b0dd6dd5187ab23 (patch) | |
tree | c4f2fa14c3351eac87ce239cfeed5c36b62e40e4 /llvm/lib/Object | |
parent | 26bfc9e5da33a05b1da46314891edf61ef334f4a (diff) | |
download | bcm5719-llvm-4f91c2f2bd4ddc6af9ae58018b0dd6dd5187ab23.tar.gz bcm5719-llvm-4f91c2f2bd4ddc6af9ae58018b0dd6dd5187ab23.zip |
Object: Implement casting for concrete classes.
llvm-svn: 142314
Diffstat (limited to 'llvm/lib/Object')
-rw-r--r-- | llvm/lib/Object/ELFObjectFile.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Object/ELFObjectFile.cpp b/llvm/lib/Object/ELFObjectFile.cpp index e13c31214a7..7a992e2fecf 100644 --- a/llvm/lib/Object/ELFObjectFile.cpp +++ b/llvm/lib/Object/ELFObjectFile.cpp @@ -377,6 +377,11 @@ public: uint64_t getStringTableIndex() const; ELF::Elf64_Word getSymbolTableIndex(const Elf_Sym *symb) const; const Elf_Shdr *getSection(const Elf_Sym *symb) const; + + static inline bool classof(const Binary *v) { + return v->getType() == isELF; + } + static inline bool classof(const ELFObjectFile *v) { return true; } }; } // end namespace |