diff options
author | Ben Langmuir <ben.langmuir@intel.com> | 2013-05-09 19:17:11 +0000 |
---|---|---|
committer | Ben Langmuir <ben.langmuir@intel.com> | 2013-05-09 19:17:11 +0000 |
commit | 3b4c30b7e77edb76da538fb4989957a219c6438f (patch) | |
tree | cf67400674bb8e2328ec34116fc3261b1d46840c /clang/lib/AST/MicrosoftMangle.cpp | |
parent | 00681dc1f070496b2b0ddbd260e01b3e290ae9fd (diff) | |
download | bcm5719-llvm-3b4c30b7e77edb76da538fb4989957a219c6438f.tar.gz bcm5719-llvm-3b4c30b7e77edb76da538fb4989957a219c6438f.zip |
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
llvm-svn: 181536
Diffstat (limited to 'clang/lib/AST/MicrosoftMangle.cpp')
-rw-r--r-- | clang/lib/AST/MicrosoftMangle.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index 1785063d7b1..7c797eef4d5 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -541,6 +541,10 @@ void MicrosoftCXXNameMangler::manglePostfix(const DeclContext *DC, Context.mangleBlock(BD, Out); Out << '@'; return manglePostfix(DC->getParent(), NoFunction); + } else if (isa<CapturedDecl>(DC)) { + // Skip CapturedDecl context. + manglePostfix(DC->getParent(), NoFunction); + return; } if (NoFunction && (isa<FunctionDecl>(DC) || isa<ObjCMethodDecl>(DC))) |