From 4db5c3c83a22268ff0eeaa6ca7fd500668533487 Mon Sep 17 00:00:00 2001 From: John McCall Date: Thu, 7 Jul 2011 06:58:02 +0000 Subject: In ARC, reclaim all return values of retainable type, not just those where we have an immediate need of a retained value. As an exception, don't do this when the call is made as the immediate operand of a __bridge retain. This is more in the way of a workaround than an actual guarantee, so it's acceptable to be brittle here. rdar://problem/9504800 llvm-svn: 134605 --- clang/lib/CodeGen/CGExprComplex.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/CodeGen/CGExprComplex.cpp') diff --git a/clang/lib/CodeGen/CGExprComplex.cpp b/clang/lib/CodeGen/CGExprComplex.cpp index 95dcc0b3aead..a88f112a1676 100644 --- a/clang/lib/CodeGen/CGExprComplex.cpp +++ b/clang/lib/CodeGen/CGExprComplex.cpp @@ -407,6 +407,7 @@ ComplexPairTy ComplexExprEmitter::EmitCast(CastExpr::CastKind CK, Expr *Op, case CK_IntegralComplexToBoolean: case CK_ObjCProduceObject: case CK_ObjCConsumeObject: + case CK_ObjCReclaimReturnedObject: llvm_unreachable("invalid cast kind for complex value"); case CK_FloatingRealToComplex: -- cgit v1.2.3