summaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-09-06 11:45:14 +0000
committerDuncan Sands <baldrick@free.fr>2009-09-06 11:45:14 +0000
commit8ecbe8d974e1c1f778207b87dcdf887060f5c699 (patch)
treeffa546647ee39691acffd56214559ba7966a302d /include/llvm
parent740eb5323e449ae4b00a3f657bffaceadcbe2624 (diff)
downloadllvm-8ecbe8d974e1c1f778207b87dcdf887060f5c699.tar.gz
llvm-8ecbe8d974e1c1f778207b87dcdf887060f5c699.tar.bz2
llvm-8ecbe8d974e1c1f778207b87dcdf887060f5c699.tar.xz
Mark constants as unsigned, as pointed out by icc
warnings (#174). Patch by Erick Tryzelaar. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81111 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/ADT/DenseMapInfo.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/llvm/ADT/DenseMapInfo.h b/include/llvm/ADT/DenseMapInfo.h
index d76ebde7fb..632728bf0d 100644
--- a/include/llvm/ADT/DenseMapInfo.h
+++ b/include/llvm/ADT/DenseMapInfo.h
@@ -63,38 +63,38 @@ template<> struct DenseMapInfo<char> {
// Provide DenseMapInfo for unsigned ints.
template<> struct DenseMapInfo<unsigned> {
static inline unsigned getEmptyKey() { return ~0; }
- static inline unsigned getTombstoneKey() { return ~0 - 1; }
+ static inline unsigned getTombstoneKey() { return ~0U - 1; }
static unsigned getHashValue(const unsigned& Val) { return Val * 37; }
static bool isPod() { return true; }
static bool isEqual(const unsigned& LHS, const unsigned& RHS) {
- return LHS == RHS;
+ return LHS == RHS;
}
};
// Provide DenseMapInfo for unsigned longs.
template<> struct DenseMapInfo<unsigned long> {
- static inline unsigned long getEmptyKey() { return ~0L; }
- static inline unsigned long getTombstoneKey() { return ~0L - 1L; }
+ static inline unsigned long getEmptyKey() { return ~0UL; }
+ static inline unsigned long getTombstoneKey() { return ~0UL - 1L; }
static unsigned getHashValue(const unsigned long& Val) {
- return (unsigned)(Val * 37L);
+ return Val * 37UL;
}
static bool isPod() { return true; }
static bool isEqual(const unsigned long& LHS, const unsigned long& RHS) {
- return LHS == RHS;
+ return LHS == RHS;
}
};
// Provide DenseMapInfo for unsigned long longs.
template<> struct DenseMapInfo<unsigned long long> {
- static inline unsigned long long getEmptyKey() { return ~0LL; }
- static inline unsigned long long getTombstoneKey() { return ~0LL - 1LL; }
+ static inline unsigned long long getEmptyKey() { return ~0ULL; }
+ static inline unsigned long long getTombstoneKey() { return ~0ULL - 1ULL; }
static unsigned getHashValue(const unsigned long long& Val) {
- return (unsigned)(Val * 37LL);
+ return Val * 37ULL;
}
static bool isPod() { return true; }
static bool isEqual(const unsigned long long& LHS,
const unsigned long long& RHS) {
- return LHS == RHS;
+ return LHS == RHS;
}
};