Object: Implement casting for concrete classes.
[oota-llvm.git] / lib / Object / ELFObjectFile.cpp
index e13c31214a7bedd41c30be018ee8402fd9f74b84..7a992e2fecf9769161c920305cfcdc8f444500d1 100644 (file)
@@ -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