diff options
author | Jeff Cohen <jeffc@jolt-lang.org> | 2007-04-09 14:32:59 +0000 |
---|---|---|
committer | Jeff Cohen <jeffc@jolt-lang.org> | 2007-04-09 14:32:59 +0000 |
commit | efc366263659db05ddc5e14532946cb9213bcdd6 (patch) | |
tree | d8fcf20eac04b265ba68ffd7690cb1ed958d037b /lib | |
parent | 4198c58c716cbe4516ac3a1a407a3cd52548bc3b (diff) |
Unbreak VC++ build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35817 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index d79f6a2049..cd61d111d2 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -45,6 +45,7 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/Compiler.h" #include <algorithm> +#include <math.h> using namespace llvm; #ifndef NDEBUG @@ -1603,7 +1604,7 @@ bool SelectionDAGLowering::handleBTSplitSwitchCase(CaseRec& CR, assert((RBegin-LEnd>=1) && "Invalid case distance"); double LDensity = (double)LSize / (double)((LEnd - First) + 1ULL); double RDensity = (double)RSize / (double)((Last - RBegin) + 1ULL); - double Metric = log(RBegin-LEnd)*(LDensity+RDensity); + double Metric = log(double(RBegin-LEnd))*(LDensity+RDensity); // Should always split in some non-trivial place DOUT <<"=>Step\n" << "LEnd: " << LEnd << ", RBegin: " << RBegin << "\n" @@ -1783,7 +1784,7 @@ bool SelectionDAGLowering::handleBitTestsSwitchCase(CaseRec& CR, } SelectionDAGISel::BitTestBlock BTB(lowBound, range, SV, - -1ULL, (CR.CaseBB == CurMBB), + -1U, (CR.CaseBB == CurMBB), CR.CaseBB, Default, BTC); if (CR.CaseBB == CurMBB) |