summaryrefslogtreecommitdiffstats
path: root/clang/CodeGen/CGExprComplex.cpp
diff options
context:
space:
mode:
authorHartmut Kaiser <hartmut.kaiser@gmail.com>2007-09-07 14:34:20 +0000
committerHartmut Kaiser <hartmut.kaiser@gmail.com>2007-09-07 14:34:20 +0000
commitec7531c9f6c1ee6463f442e90252433b71d25b3c (patch)
treeab234b9fcd06da1dd90823934742982ef7f817d5 /clang/CodeGen/CGExprComplex.cpp
parent122bf4be7eb7b741c01a159513d45b7297acd523 (diff)
downloadbcm5719-llvm-ec7531c9f6c1ee6463f442e90252433b71d25b3c.tar.gz
bcm5719-llvm-ec7531c9f6c1ee6463f442e90252433b71d25b3c.zip
Fixed compilation on Windows.
Silenced a couple of warnings. Added *.vcproj file for new clangAnalysis library. Renamed Basic to clangBasic projects. llvm-svn: 41767
Diffstat (limited to 'clang/CodeGen/CGExprComplex.cpp')
-rw-r--r--clang/CodeGen/CGExprComplex.cpp5
1 files changed, 3 insertions, 2 deletions
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<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");
OpenPOWER on IntegriCloud