From ac1303eca6cbe3e623fb5ec6fe7ec184ef4b0dfa Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 22 Feb 2012 05:02:47 +0000 Subject: Generate an AST for the conversion from a lambda closure type to a block pointer that returns a block literal which captures (by copy) the lambda closure itself. Some aspects of the block literal are left unspecified, namely the capture variable (which doesn't actually exist) and the body (which will be filled in by IRgen because it can't be written as an AST). Because we're switching to this model, this patch also eliminates tracking the copy-initialization expression for the block capture of the conversion function, since that information is now embedded in the synthesized block literal. -1 side tables FTW. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151131 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprScalar.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/CodeGen/CGExprScalar.cpp') diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 6eed2ed346..76c91a5ff3 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -1148,6 +1148,10 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { case CK_ARCExtendBlockObject: return CGF.EmitARCExtendBlockObject(E); + case CK_CopyAndAutoreleaseBlockObject: + CGF.ErrorUnsupported(E, "copy/autorelease block object"); + return 0; + case CK_FloatingRealToComplex: case CK_FloatingComplexCast: case CK_IntegralRealToComplex: -- cgit v1.2.3