diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-09-02 18:39:40 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-09-02 18:39:40 +0000 |
commit | f30bc001034566aa1fdeb63b2a3f9a533abacb93 (patch) | |
tree | 19263f28a52e606cf336abbc321f09ea720d7a0c /clang/lib/CodeGen/CGExprComplex.cpp | |
parent | 97fe09ad2ee725837fe959b9ccf090c44d260c3b (diff) | |
download | bcm5719-llvm-f30bc001034566aa1fdeb63b2a3f9a533abacb93.tar.gz bcm5719-llvm-f30bc001034566aa1fdeb63b2a3f9a533abacb93.zip |
blocks: Support capturing complex variable in block.
// rdar://10033896
llvm-svn: 139020
Diffstat (limited to 'clang/lib/CodeGen/CGExprComplex.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprComplex.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGExprComplex.cpp b/clang/lib/CodeGen/CGExprComplex.cpp index 672721ef7f3..24d01150288 100644 --- a/clang/lib/CodeGen/CGExprComplex.cpp +++ b/clang/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<ComplexType>()->getElementType()); - llvm::Value *U = llvm::UndefValue::get(EltTy); - return ComplexPairTy(U, U); + return EmitLoadOfLValue(E); } ComplexPairTy ComplexExprEmitter:: |