]> granicus.if.org Git - clang/commit
CodeGen for CapturedStmts
authorBen Langmuir <ben.langmuir@intel.com>
Thu, 9 May 2013 19:17:11 +0000 (19:17 +0000)
committerBen Langmuir <ben.langmuir@intel.com>
Thu, 9 May 2013 19:17:11 +0000 (19:17 +0000)
commit524387ae3dfc0c4cf2b095f83f9e47aa549b7e55
tree2325bc1b7670dca4f80044b4a77dbb4b52a8b28f
parent6f6162925f2553473e025a036e6a485d60667fcd
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 determined
by the parameters that are in the CapturedDecl.

Some changes have been added to this patch that were reviewed as part of the
serialization patch and moving the parameters to the captured decl.

Differential Revision: http://llvm-reviews.chandlerc.com/D640

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181536 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
include/clang/AST/GlobalDecl.h
include/clang/Basic/DiagnosticSemaKinds.td
lib/AST/ItaniumMangle.cpp
lib/AST/MicrosoftMangle.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGStmt.cpp
lib/CodeGen/CodeGenFunction.cpp
lib/CodeGen/CodeGenFunction.h
lib/Sema/SemaExpr.cpp
test/CodeGen/captured-statements-nested.c [new file with mode: 0644]
test/CodeGen/captured-statements.c [new file with mode: 0644]
test/CodeGenCXX/captured-statements.cpp [new file with mode: 0644]
test/Sema/captured-statements.c