singed int causes signed extension, which contradicts the intention to pick up
authorZhongxing Xu <xuzhongxing@foxmail.com>
Fri, 3 Jun 2011 08:29:51 +0000 (08:29 +0000)
committerZhongxing Xu <xuzhongxing@foxmail.com>
Fri, 3 Jun 2011 08:29:51 +0000 (08:29 +0000)
integers with high 32 bits being zero.

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

lib/Support/FoldingSet.cpp

index d2e35b8eb676d264cbf8b17d59d754ca73127c8e..1568342e9c9d1eab31534ed216aab788d19f0e45 100644 (file)
@@ -92,7 +92,7 @@ void FoldingSetNodeID::AddInteger(long long I) {
 }
 void FoldingSetNodeID::AddInteger(unsigned long long I) {
   AddInteger(unsigned(I));
-  if ((uint64_t)(int)I != I)
+  if ((uint64_t)(unsigned)I != I)
     Bits.push_back(unsigned(I >> 32));
 }