From: Rafael Espindola Date: Mon, 15 Jun 2015 14:49:41 +0000 (+0000) Subject: Avoid a "always true" warning from gcc. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1ec22e4a9c5f3344ec6d46b0b2990a4d3a82cadf;p=oota-llvm.git Avoid a "always true" warning from gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239729 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Object/ELFTypes.h b/include/llvm/Object/ELFTypes.h index 4b8ed883482..2eda0c179f1 100644 --- a/include/llvm/Object/ELFTypes.h +++ b/include/llvm/Object/ELFTypes.h @@ -192,7 +192,9 @@ struct Elf_Sym_Impl : Elf_Sym_Base { 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; } };