summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprComplex.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-09-02 20:03:16 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-09-02 20:03:16 +0000
commitb74711df529a4510abed7dddbdd53d71741ccad7 (patch)
treea10746fab00e37bcbdcd5e83aba9fcbebb2b32a3 /clang/lib/CodeGen/CGExprComplex.cpp
parent5b03f722926627fc8828fec3be0365ecebf9e258 (diff)
downloadbcm5719-llvm-b74711df529a4510abed7dddbdd53d71741ccad7.tar.gz
bcm5719-llvm-b74711df529a4510abed7dddbdd53d71741ccad7.zip
revert patch in r139020
llvm-svn: 139029
Diffstat (limited to 'clang/lib/CodeGen/CGExprComplex.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprComplex.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExprComplex.cpp b/clang/lib/CodeGen/CGExprComplex.cpp
index 24d01150288..1a27d1322bc 100644
--- a/clang/lib/CodeGen/CGExprComplex.cpp
+++ b/clang/lib/CodeGen/CGExprComplex.cpp
@@ -311,7 +311,11 @@ void ComplexExprEmitter::EmitStoreOfComplex(ComplexPairTy Val, llvm::Value *Ptr,
//===----------------------------------------------------------------------===//
ComplexPairTy ComplexExprEmitter::VisitExpr(Expr *E) {
- return EmitLoadOfLValue(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);
}
ComplexPairTy ComplexExprEmitter::
OpenPOWER on IntegriCloud