Fixed compilation on Windows.
Silenced a couple of warnings.
Added *.vcproj file for new clangAnalysis library.
Renamed Basic to clangBasic projects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41767 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CodeGen/CGExprComplex.cpp b/CodeGen/CGExprComplex.cpp
index 9c02641..ec5a1bc 100644
--- a/CodeGen/CGExprComplex.cpp
+++ b/CodeGen/CGExprComplex.cpp
@@ -296,13 +296,14 @@
// FIXME: Handle volatile!
ComplexPairTy InVal = EmitLoadOfComplex(LV.getAddress(), false);
- int AmountVal = isInc ? 1 : -1;
+ uint64_t AmountVal = isInc ? 1 : -1;
llvm::Value *NextVal;
if (isa<llvm::IntegerType>(InVal.first->getType()))
NextVal = llvm::ConstantInt::get(InVal.first->getType(), AmountVal);
else
- NextVal = llvm::ConstantFP::get(InVal.first->getType(), AmountVal);
+ NextVal = llvm::ConstantFP::get(InVal.first->getType(),
+ static_cast<double>(AmountVal));
// Add the inc/dec to the real part.
NextVal = Builder.CreateAdd(InVal.first, NextVal, isInc ? "inc" : "dec");
diff --git a/CodeGen/CGExprScalar.cpp b/CodeGen/CGExprScalar.cpp
index 3bb2678..96203f0 100644
--- a/CodeGen/CGExprScalar.cpp
+++ b/CodeGen/CGExprScalar.cpp
@@ -469,7 +469,8 @@
if (isa<llvm::IntegerType>(InVal->getType()))
NextVal = llvm::ConstantInt::get(InVal->getType(), AmountVal);
else
- NextVal = llvm::ConstantFP::get(InVal->getType(), AmountVal);
+ NextVal = llvm::ConstantFP::get(InVal->getType(),
+ static_cast<double>(AmountVal));
NextVal = Builder.CreateAdd(InVal, NextVal, isInc ? "inc" : "dec");
}