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
diff --git a/lib/CodeGen/CGExprComplex.cpp b/lib/CodeGen/CGExprComplex.cpp
index e25ee95..df8d1b4 100644
--- a/lib/CodeGen/CGExprComplex.cpp
+++ b/lib/CodeGen/CGExprComplex.cpp
@@ -267,7 +267,7 @@
 
 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 @@
 /// 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 @@
 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));