diff options
Diffstat (limited to 'include/llvm/Object/ELF.h')
-rw-r--r-- | include/llvm/Object/ELF.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/Object/ELF.h b/include/llvm/Object/ELF.h index e746b0aaa5..e27a23edeb 100644 --- a/include/llvm/Object/ELF.h +++ b/include/llvm/Object/ELF.h @@ -484,7 +484,8 @@ public: // Methods for type inquiry through isa, cast, and dyn_cast bool isDyldType() const { return isDyldELFObject; } static inline bool classof(const Binary *v) { - return v->getType() == Binary::isELF; + return v->getType() == getELFType(target_endianness == support::little, + is64Bits); } static inline bool classof(const ELFObjectFile *v) { return true; } }; @@ -1257,7 +1258,8 @@ void ELFObjectFile<target_endianness, is64Bits> template<support::endianness target_endianness, bool is64Bits> ELFObjectFile<target_endianness, is64Bits>::ELFObjectFile(MemoryBuffer *Object , error_code &ec) - : ObjectFile(Binary::isELF, Object, ec) + : ObjectFile(getELFType(target_endianness == support::little, is64Bits), + Object, ec) , isDyldELFObject(false) , SectionHeaderTable(0) , dot_shstrtab_sec(0) |