Fix the non-gcc 4.0 path to compile

llvm-svn: 22593
This commit is contained in:
Chris Lattner 2005-08-02 19:21:51 +00:00
parent d59fba1bce
commit a9994bf67a

View File

@ -117,7 +117,8 @@ inline unsigned CountLeadingZeros_64(uint64_t Value) {
if (!Value) return 64;
#endif
Count = __builtin_clzll(Value);
#elif sizeof(long) == sizeof(int64_t)
#else
if (sizeof(long) == sizeof(int64_t)) {
if (!Value) return 64;
Count = 0;
// bisecton method for count leading zeros
@ -128,7 +129,7 @@ inline unsigned CountLeadingZeros_64(uint64_t Value) {
Value = Tmp;
}
}
#else
} else {
// get hi portion
unsigned Hi = Hi_32(Value);
@ -142,6 +143,7 @@ inline unsigned CountLeadingZeros_64(uint64_t Value) {
// same as 32 bit value
Count = CountLeadingZeros_32(Lo);
}
}
#endif
return Count;
}