aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGStmt.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
commit9b2dc287177394a8f73833e2ad4f7ca8cd6f22bb (patch)
treeb1fde547077d020b5141ca5c5d54c2388587586c /lib/CodeGen/CGStmt.cpp
parentf23d364084d1aabea688222780d6fc1dd8c7f78c (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/CGStmt.cpp')
-rw-r--r--lib/CodeGen/CGStmt.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp
index df62e4aa1d..4a41a4962f 100644
--- a/lib/CodeGen/CGStmt.cpp
+++ b/lib/CodeGen/CGStmt.cpp
@@ -36,7 +36,7 @@ void CodeGenFunction::EmitStmt(const Stmt *S) {
if (const Expr *E = dyn_cast<Expr>(S)) {
if (!hasAggregateLLVMType(E->getType()))
EmitScalarExpr(E);
- else if (E->getType()->isComplexType())
+ else if (E->getType()->isAnyComplexType())
EmitComplexExpr(E);
else
EmitAggExpr(E, 0, false);
@@ -344,7 +344,7 @@ void CodeGenFunction::EmitReturnStmt(const ReturnStmt &S) {
Builder.CreateRet(llvm::UndefValue::get(RetTy));
} else if (!hasAggregateLLVMType(RV->getType())) {
Builder.CreateRet(EmitScalarExpr(RV));
- } else if (RV->getType()->isComplexType()) {
+ } else if (RV->getType()->isAnyComplexType()) {
llvm::Value *SRetPtr = CurFn->arg_begin();
EmitComplexExprIntoAddr(RV, SRetPtr, false);
} else {