[PATCH] Move CapturedStmt parameters to CapturedDecl

Ben Langmuir ben.langmuir at intel.com
Wed Apr 24 11:48:08 PDT 2013


benlangmuir added you to the CC list for the revision "Move CapturedStmt parameters to CapturedDecl".

Hi wei.pan, doug.gregor, rjmccall,

Move CapturedStmt parameters to CapturedDecl

Move the creation of CapturedStmt parameters out of CodeGen and into Sema, making it easier to customize the outlined function.  In Cilk, we use this to create the cilk_for helper with the signature helper(void *context, int low, int high).

In the codegen, make CGCapturedStmtInfo useful as a base class for specific implementations, by providing a methods to emit the captured statement body and set its name.

Finally, there is a small change to have EmitCapturedStmt return the outlined function to allow a parent to find this anonymous function.  In Cilk, we use this to set attributes on the outlined function from EmitCilkSpawnStmt, which calls into EmitCapturedStmt.

http://llvm-reviews.chandlerc.com/D722

Files:
  include/clang/AST/Decl.h
  include/clang/Sema/ScopeInfo.h
  lib/CodeGen/CGStmt.cpp
  lib/CodeGen/CodeGenFunction.cpp
  lib/CodeGen/CodeGenFunction.h
  lib/Sema/Sema.cpp
  lib/Sema/SemaStmt.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D722.1.patch
Type: text/x-patch
Size: 10870 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130424/668c5ac0/attachment.bin>


More information about the cfe-commits mailing list