From da8e571ce443304665de1a1713980e7f2a2dbc54 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Fri, 2 Sep 2011 18:39:40 +0000 Subject: blocks: Support capturing complex variable in block. // rdar://10033896 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139020 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprComplex.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib/CodeGen/CGExprComplex.cpp') diff --git a/lib/CodeGen/CGExprComplex.cpp b/lib/CodeGen/CGExprComplex.cpp index 672721ef7f..24d0115028 100644 --- a/lib/CodeGen/CGExprComplex.cpp +++ b/lib/CodeGen/CGExprComplex.cpp @@ -311,11 +311,7 @@ void ComplexExprEmitter::EmitStoreOfComplex(ComplexPairTy Val, llvm::Value *Ptr, //===----------------------------------------------------------------------===// ComplexPairTy ComplexExprEmitter::VisitExpr(Expr *E) { - CGF.ErrorUnsupported(E, "complex expression"); - llvm::Type *EltTy = - CGF.ConvertType(E->getType()->getAs()->getElementType()); - llvm::Value *U = llvm::UndefValue::get(EltTy); - return ComplexPairTy(U, U); + return EmitLoadOfLValue(E); } ComplexPairTy ComplexExprEmitter:: -- cgit v1.2.3