From: Chris Lattner Date: Tue, 17 Sep 2002 23:56:50 +0000 (+0000) Subject: Fix ambiguity problem due to builtin log2(double) function X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=16ca2b991b07c85237e53e8b0c97f30c4cbc6e3d;p=oota-llvm.git Fix ambiguity problem due to builtin log2(double) function git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3800 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/Support/MathExtras.h b/include/Support/MathExtras.h index bd5692b3ddb..d9076580b7e 100644 --- a/include/Support/MathExtras.h +++ b/include/Support/MathExtras.h @@ -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; } diff --git a/include/llvm/Support/MathExtras.h b/include/llvm/Support/MathExtras.h index bd5692b3ddb..d9076580b7e 100644 --- a/include/llvm/Support/MathExtras.h +++ b/include/llvm/Support/MathExtras.h @@ -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; }