From ec7531c9f6c1ee6463f442e90252433b71d25b3c Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Fri, 7 Sep 2007 14:34:20 +0000 Subject: Fixed compilation on Windows. Silenced a couple of warnings. Added *.vcproj file for new clangAnalysis library. Renamed Basic to clangBasic projects. llvm-svn: 41767 --- clang/CodeGen/CGExprComplex.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'clang/CodeGen/CGExprComplex.cpp') diff --git a/clang/CodeGen/CGExprComplex.cpp b/clang/CodeGen/CGExprComplex.cpp index 9c02641d1fd..ec5a1bc71af 100644 --- a/clang/CodeGen/CGExprComplex.cpp +++ b/clang/CodeGen/CGExprComplex.cpp @@ -296,13 +296,14 @@ ComplexPairTy ComplexExprEmitter::VisitPrePostIncDec(const UnaryOperator *E, // 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(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(AmountVal)); // Add the inc/dec to the real part. NextVal = Builder.CreateAdd(InVal.first, NextVal, isInc ? "inc" : "dec"); -- cgit v1.2.3