[Object][ELF] Fix -Wenum-compare.
authorMichael J. Spencer <bigcheesegs@gmail.com>
Tue, 15 Jan 2013 22:00:16 +0000 (22:00 +0000)
committerMichael J. Spencer <bigcheesegs@gmail.com>
Tue, 15 Jan 2013 22:00:16 +0000 (22:00 +0000)
llvm-svn: 172556

llvm/include/llvm/Object/ELF.h

index 285c047..c47b9cd 100644 (file)
@@ -1962,9 +1962,11 @@ void ELFObjectFile<ELFT>::VerifyStrTab(const Elf_Shdr *sh) const {
 
 template<class ELFT>
 ELFObjectFile<ELFT>::ELFObjectFile(MemoryBuffer *Object, error_code &ec)
-  : ObjectFile(getELFType(ELFT::TargetEndianness == support::little,
-                          ELFT::Is64Bits),
-               Object, ec)
+  : ObjectFile(getELFType(
+      static_cast<endianness>(ELFT::TargetEndianness) == support::little,
+      ELFT::Is64Bits),
+      Object,
+      ec)
   , isDyldELFObject(false)
   , SectionHeaderTable(0)
   , dot_shstrtab_sec(0)