summaryrefslogtreecommitdiff
path: root/lib/Serialization/ASTWriterDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-02-16 01:06:16 +0000
committerDouglas Gregor <dgregor@apple.com>2012-02-16 01:06:16 +0000
commitf6e2e0291b8964ed41b4325e21dd90b86e791f10 (patch)
treec630fad2fe486d3f2d2d3cfd815937fd52e71dd8 /lib/Serialization/ASTWriterDecl.cpp
parentb49bd27b334a6c4e3bf9d810a7d5b022578f1194 (diff)
downloadclang-f6e2e0291b8964ed41b4325e21dd90b86e791f10.tar.gz
clang-f6e2e0291b8964ed41b4325e21dd90b86e791f10.tar.bz2
clang-f6e2e0291b8964ed41b4325e21dd90b86e791f10.tar.xz
Implicitly define a lambda's conversion functions (to function
pointers and block pointers). We use dummy definitions to keep the invariant that an implicit, used definition has a body; IR generation will substitute the actual contents, since they can't be represented as C++. For the block pointer case, compute the copy-initialization needed to capture the lambda object in the block, which IR generation will need later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150645 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriterDecl.cpp')
-rw-r--r--lib/Serialization/ASTWriterDecl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Serialization/ASTWriterDecl.cpp b/lib/Serialization/ASTWriterDecl.cpp
index 7cd2f4ebed..584ff1c144 100644
--- a/lib/Serialization/ASTWriterDecl.cpp
+++ b/lib/Serialization/ASTWriterDecl.cpp
@@ -961,6 +961,8 @@ void ASTDeclWriter::VisitCXXDestructorDecl(CXXDestructorDecl *D) {
void ASTDeclWriter::VisitCXXConversionDecl(CXXConversionDecl *D) {
VisitCXXMethodDecl(D);
Record.push_back(D->IsExplicitSpecified);
+ if (D->isLambdaToBlockPointerConversion())
+ Writer.AddStmt(D->getLambdaToBlockPointerCopyInit());
Code = serialization::DECL_CXX_CONVERSION;
}