diff options
author | Chris Lattner <sabre@nondot.org> | 2008-04-04 16:54:41 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-04-04 16:54:41 +0000 |
commit | 9b2dc287177394a8f73833e2ad4f7ca8cd6f22bb (patch) | |
tree | b1fde547077d020b5141ca5c5d54c2388587586c /lib/CodeGen/CGExprComplex.cpp | |
parent | f23d364084d1aabea688222780d6fc1dd8c7f78c (diff) |
Since isComplexType() no longer returns true for _Complex integers, the code
generator needs to call isAnyComplexType(). This fixes PR1960.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49220 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprComplex.cpp')
-rw-r--r-- | lib/CodeGen/CGExprComplex.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CGExprComplex.cpp b/lib/CodeGen/CGExprComplex.cpp index e25ee9563a..df8d1b404e 100644 --- a/lib/CodeGen/CGExprComplex.cpp +++ b/lib/CodeGen/CGExprComplex.cpp @@ -267,7 +267,7 @@ ComplexPairTy ComplexExprEmitter::EmitComplexToComplexCast(ComplexPairTy Val, ComplexPairTy ComplexExprEmitter::EmitCast(Expr *Op, QualType DestTy) { // Two cases here: cast from (complex to complex) and (scalar to complex). - if (Op->getType()->isComplexType()) + if (Op->getType()->isAnyComplexType()) return EmitComplexToComplexCast(Visit(Op), Op->getType(), DestTy); // C99 6.3.1.7: When a value of real type is converted to a complex type, the @@ -506,7 +506,7 @@ ComplexPairTy ComplexExprEmitter::VisitChooseExpr(ChooseExpr *E) { /// EmitComplexExpr - Emit the computation of the specified expression of /// complex type, ignoring the result. ComplexPairTy CodeGenFunction::EmitComplexExpr(const Expr *E) { - assert(E && E->getType()->isComplexType() && + assert(E && E->getType()->isAnyComplexType() && "Invalid complex expression to emit"); return ComplexExprEmitter(*this).Visit(const_cast<Expr*>(E)); @@ -517,7 +517,7 @@ ComplexPairTy CodeGenFunction::EmitComplexExpr(const Expr *E) { void CodeGenFunction::EmitComplexExprIntoAddr(const Expr *E, llvm::Value *DestAddr, bool DestIsVolatile) { - assert(E && E->getType()->isComplexType() && + assert(E && E->getType()->isAnyComplexType() && "Invalid complex expression to emit"); ComplexExprEmitter Emitter(*this); ComplexPairTy Val = Emitter.Visit(const_cast<Expr*>(E)); |