diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-02-10 07:45:31 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-02-10 07:45:31 +0000 |
commit | 4d8d22bfaed6e5d7da6b5556415b18c43b44e36c (patch) | |
tree | e426e3c83c502004ea93b36f96ae13503f7f3566 /include/clang/AST/ASTContext.h | |
parent | 864b1cf13b288c5099911e1265431ffdcac060a4 (diff) |
Extend CXXRecordDecl with a function that determines the mapping from
the variables captured by a lambda to the fields that store the
captured values. To be used in IRgen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150235 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/ASTContext.h')
-rw-r--r-- | include/clang/AST/ASTContext.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index 3236977030..82570f594d 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -59,6 +59,7 @@ namespace clang { class CXXRecordDecl; class Decl; class FieldDecl; + class LambdaExpr; class MangleContext; class ObjCIvarDecl; class ObjCIvarRefExpr; @@ -163,6 +164,10 @@ class ASTContext : public llvm::RefCountedBase<ASTContext> { llvm::DenseMap<const FunctionDecl*, FunctionDecl*> ClassScopeSpecializationPattern; + /// \brief Mapping from closure types to the lambda expressions that + /// create instances of them. + llvm::DenseMap<const CXXRecordDecl *, LambdaExpr *> Lambdas; + /// \brief Representation of a "canonical" template template parameter that /// is used in canonical template names. class CanonicalTemplateTemplateParm : public llvm::FoldingSetNode { @@ -358,7 +363,8 @@ class ASTContext : public llvm::RefCountedBase<ASTContext> { friend class ASTDeclReader; friend class ASTReader; friend class ASTWriter; - + friend class CXXRecordDecl; + const TargetInfo *Target; clang::PrintingPolicy PrintingPolicy; |