[PATCH] CodeGen for CapturedStmt
Ben Langmuir
ben.langmuir at intel.com
Mon Apr 8 12:41:09 PDT 2013
Hi rjmccall, ABataev,
CodeGen for CapturedStmts
- EmitCapturedStmt creates a captured struct containing all of the captured
variables, and then emits a call to the outlined function. This is similar
in principle to EmitBlockLiteral.
- GenerateCapturedFunction actually produces the outlined function. It is based
on GenerateBlockFunction, but is much simpler. The function type is currently
fixed, and the function contains only the body of the captured statement.
- When this is extended for different kinds of captured statements, I imagine
that hooks will be added to customize the function type/parameters, and insert
prologue/epilogue code.
This patch depends on the following uncommitted patches:
- http://llvm-reviews.chandlerc.com/D369 (parsing)
- http://llvm-reviews.chandlerc.com/D370 (AST)
- http://llvm-reviews.chandlerc.com/D433 (Sema)
http://llvm-reviews.chandlerc.com/D640
Files:
include/clang/AST/GlobalDecl.h
lib/AST/ItaniumMangle.cpp
lib/AST/MicrosoftMangle.cpp
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGStmt.cpp
lib/CodeGen/CodeGenFunction.cpp
lib/CodeGen/CodeGenFunction.h
test/CodeGen/captured-statements.c
test/CodeGenCXX/captured-statements.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D640.1.patch
Type: text/x-patch
Size: 15983 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130408/6eb19823/attachment.bin>
More information about the cfe-commits
mailing list