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 | ab6bcf35aefe823894d349773ebd53f465f122b7 (patch) | |
tree | 1629fe701eea53014966d4bee06de19144223c26 /include/llvm/Object/MachO.h | |
parent | 7c81013c4521ceab3e98d5be1fdcf3853e27e077 (diff) |
Object: Implement casting for concrete classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142314 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Object/MachO.h')
-rw-r--r-- | include/llvm/Object/MachO.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Object/MachO.h b/include/llvm/Object/MachO.h index 71830aa89b..147987e8f1 100644 --- a/include/llvm/Object/MachO.h +++ b/include/llvm/Object/MachO.h @@ -40,6 +40,11 @@ public: MachOObject *getObject() { return MachOObj; } + static inline bool classof(const Binary *v) { + return v->getType() == isMachO; + } + static inline bool classof(const MachOObjectFile *v) { return true; } + protected: virtual error_code getSymbolNext(DataRefImpl Symb, SymbolRef &Res) const; virtual error_code getSymbolName(DataRefImpl Symb, StringRef &Res) const; |