aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/MathExtras.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/MathExtras.h')
-rw-r--r--include/llvm/Support/MathExtras.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Support/MathExtras.h b/include/llvm/Support/MathExtras.h
index bd5692b3dd..d9076580b7 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;
}