Avoid a "always true" warning from gcc.

llvm-svn: 239729
This commit is contained in:
Rafael Espindola 2015-06-15 14:49:41 +00:00
parent 9544098b8b
commit 063584faef
1 changed files with 3 additions and 1 deletions

View File

@ -192,7 +192,9 @@ struct Elf_Sym_Impl : Elf_Sym_Base<ELFT> {
return st_shndx >= ELF::SHN_LOOS && st_shndx <= ELF::SHN_HIOS;
}
bool isReserved() const {
return st_shndx >= ELF::SHN_LORESERVE && st_shndx <= ELF::SHN_HIRESERVE;
// ELF::SHN_HIRESERVE is 0xffff so st_shndx <= ELF::SHN_HIRESERVE is always
// true and some compilers warn about it.
return st_shndx >= ELF::SHN_LORESERVE;
}
bool isUndefined() const { return st_shndx == ELF::SHN_UNDEF; }
};