Fix ambiguity problem due to builtin log2(double) function

llvm-svn: 3800
This commit is contained in:
Chris Lattner 2002-09-17 23:56:50 +00:00
parent 86e6e0f6e3
commit af94e5bd3b

View File

@ -19,7 +19,7 @@ inline unsigned log2(uint64_t C) {
inline bool isPowerOf2(int64_t C, unsigned &getPow) {
if (C < 0) C = -C;
if (C > 0 && C == (C & ~(C - 1))) {
getPow = log2(C);
getPow = log2((uint64_t)C);
return true;
}