Dial down gcc's warnings: don't use 0UL when 0U suffices (and when the
authorScott Michel <scottm@aero.org>
Tue, 18 Mar 2008 16:55:06 +0000 (16:55 +0000)
committerScott Michel <scottm@aero.org>
Tue, 18 Mar 2008 16:55:06 +0000 (16:55 +0000)
variables and methods themselves only use unsigned.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48492 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/SparseBitVector.h
lib/Analysis/IPA/Andersens.cpp

index 215149a5a699678f697a628f97a6751f5404b5ba..4d37eae5df2fe2bd0e240d8a1cd12b17d2854371 100644 (file)
@@ -70,7 +70,7 @@ private:
   BitWord Bits[BITWORDS_PER_ELEMENT];
   // Needed for sentinels
   SparseBitVectorElement() {
-    ElementIndex = ~0UL;
+    ElementIndex = ~0U;
     memset(&Bits[0], 0, sizeof (BitWord) * BITWORDS_PER_ELEMENT);
   }
 
index 8650fb1334c97675c60e51d322204300d04e6358..a66a6faf1c5dc209e049dcf32f3e19259eb1f437 100644 (file)
@@ -171,10 +171,10 @@ namespace {
     // it's thing
     struct PairKeyInfo {
       static inline std::pair<unsigned, unsigned> getEmptyKey() {
-        return std::make_pair(~0UL, ~0UL);
+        return std::make_pair(~0U, ~0U);
       }
       static inline std::pair<unsigned, unsigned> getTombstoneKey() {
-        return std::make_pair(~0UL - 1, ~0UL - 1);
+        return std::make_pair(~0U - 1, ~0U - 1);
       }
       static unsigned getHashValue(const std::pair<unsigned, unsigned> &P) {
         return P.first ^ P.second;
@@ -187,10 +187,10 @@ namespace {
     
     struct ConstraintKeyInfo {
       static inline Constraint getEmptyKey() {
-        return Constraint(Constraint::Copy, ~0UL, ~0UL, ~0UL);
+        return Constraint(Constraint::Copy, ~0U, ~0U, ~0U);
       }
       static inline Constraint getTombstoneKey() {
-        return Constraint(Constraint::Copy, ~0UL - 1, ~0UL - 1, ~0UL - 1);
+        return Constraint(Constraint::Copy, ~0U - 1, ~0U - 1, ~0U - 1);
       }
       static unsigned getHashValue(const Constraint &C) {
         return C.Src ^ C.Dest ^ C.Type ^ C.Offset;