diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-10-29 03:43:06 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-10-29 03:43:06 +0000 |
commit | 8370057f0cbdcd1dc8e8a082eedd150eb993c52e (patch) | |
tree | b27385a148e370a8f44bb232c22717e0e3c95ac9 /lib/Analysis/MemoryBuiltins.cpp | |
parent | 84e58d03c910aa6ea8557d2f2f9de1f96162cae1 (diff) |
Explicitly convert to double to suppress Visual C++ 2008 build error C2668 pow is ambiguous call to overloaded function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85478 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/MemoryBuiltins.cpp')
-rw-r--r-- | lib/Analysis/MemoryBuiltins.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/MemoryBuiltins.cpp b/lib/Analysis/MemoryBuiltins.cpp index 0982345cfa..707a9ee77d 100644 --- a/lib/Analysis/MemoryBuiltins.cpp +++ b/lib/Analysis/MemoryBuiltins.cpp @@ -159,7 +159,7 @@ static Value* isArrayMallocHelper(const CallInst *CI, LLVMContext &Context, ConstantInt* Op1Int = dyn_cast<ConstantInt>(Op1); if (!Op1Int) return NULL; Value* Op1Pow = ConstantInt::get(Op1->getType(), - pow(2, Op1Int->getZExtValue())); + pow((double) 2, (double) Op1Int->getZExtValue())); if (Op0 == ElementSize || (FoldedElementSize && Op0 == FoldedElementSize)) // ArraySize << log2(ElementSize) return Op1Pow; |