summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGExprComplex.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-04-04 16:54:41 +0000
committerChris Lattner <sabre@nondot.org>2008-04-04 16:54:41 +0000
commitf3bc75afcfb2bf799776b0f765e145e8cc72d351 (patch)
treedb6a8dad9a8efb4e4d68a161962442a1a08305e9 /clang/lib/CodeGen/CGExprComplex.cpp
parent50ad37b6d95cf680aa482cd14419dbb393b69c92 (diff)
Since isComplexType() no longer returns true for _Complex integers, the code
generator needs to call isAnyComplexType(). This fixes PR1960. llvm-svn: 49220
Diffstat (limited to 'clang/lib/CodeGen/CGExprComplex.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprComplex.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGExprComplex.cpp b/clang/lib/CodeGen/CGExprComplex.cpp
index e25ee9563a13..df8d1b404ec6 100644
--- a/clang/lib/CodeGen/CGExprComplex.cpp
+++ b/clang/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));