diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-02-25 02:48:22 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-02-25 02:48:22 +0000 |
commit | 64bee65a3436e3f0c352fcfe2130676f3502cffe (patch) | |
tree | 9154d934a177c762072a49a0fa5d0813c37c780a /lib/CodeGen/CodeGenFunction.h | |
parent | e1d4330adaaa7faf093e725c9c993207eb2d778a (diff) |
Work-in-progress for lambda conversion-to-block operator. Still need to implement the retain+autorelease outside of ARC, and there's a bug that causes the generated code to crash in ARC (which I think is unrelated to my code, although I'm not completely sure).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151428 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index 65338bf8ee..71f2362311 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -601,6 +601,7 @@ public: llvm::DenseMap<const VarDecl *, FieldDecl *> LambdaCaptureFields; FieldDecl *LambdaThisCaptureField; + bool InLambdaConversionToBlock; /// \brief A mapping from NRVO variables to the flags used to indicate /// when the NRVO has been applied to this variable. @@ -1335,7 +1336,8 @@ public: llvm::Function *GenerateBlockFunction(GlobalDecl GD, const CGBlockInfo &Info, const Decl *OuterFuncDecl, - const DeclMapTy &ldm); + const DeclMapTy &ldm, + bool IsLambdaConversionToBlock); llvm::Constant *GenerateCopyHelperFunction(const CGBlockInfo &blockInfo); llvm::Constant *GenerateDestroyHelperFunction(const CGBlockInfo &blockInfo); @@ -1376,7 +1378,10 @@ public: void EmitDestructorBody(FunctionArgList &Args); void EmitFunctionBody(FunctionArgList &Args); + void EmitForwardingCallToLambda(const CXXRecordDecl *Lambda, + CallArgList &CallArgs); void EmitLambdaToBlockPointerBody(FunctionArgList &Args); + void EmitLambdaBlockInvokeBody(); void EmitLambdaDelegatingInvokeBody(const CXXMethodDecl *MD); void EmitLambdaStaticInvokeFunction(const CXXMethodDecl *MD); |