summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2013-01-15 23:46:58 +0000
committerDavid Greene <greened@obbligato.org>2013-01-15 23:46:58 +0000
commit99e6c1157d7dca071e33207cd8d0a44f14306803 (patch)
tree13697358f494fa4a4236710e004ffc34e3b50104 /llvm
parent7df850924d07849d313a90d79ff52e1e5ae55c68 (diff)
downloadbcm5719-llvm-99e6c1157d7dca071e33207cd8d0a44f14306803.tar.gz
bcm5719-llvm-99e6c1157d7dca071e33207cd8d0a44f14306803.zip
Avoid Enum Compare Warnings
Avoid a compiler warning about comparing disjoint enums but casting them to int first. llvm-svn: 172577
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Object/ELF.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/include/llvm/Object/ELF.h b/llvm/include/llvm/Object/ELF.h
index c47b9cdf32d..f22ee71ca46 100644
--- a/llvm/include/llvm/Object/ELF.h
+++ b/llvm/include/llvm/Object/ELF.h
@@ -792,7 +792,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() == getELFType(ELFT::TargetEndianness == support::little,
+ return v->getType() == getELFType(static_cast<int>(ELFT::TargetEndianness)
+ == static_cast<int>(support::little),
ELFT::Is64Bits);
}
};
@@ -2379,7 +2380,8 @@ unsigned ELFObjectFile<ELFT>::getArch() const {
case ELF::EM_HEXAGON:
return Triple::hexagon;
case ELF::EM_MIPS:
- return (ELFT::TargetEndianness == support::little) ?
+ return (static_cast<int>(ELFT::TargetEndianness)
+ == static_cast<int>(support::little)) ?
Triple::mipsel : Triple::mips;
case ELF::EM_PPC64:
return Triple::ppc64;
OpenPOWER on IntegriCloud