diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-02-16 01:06:16 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-02-16 01:06:16 +0000 |
commit | d3b672c38545de350a09d06fa19bd0f7589d9345 (patch) | |
tree | a36c3c7254e9210b3893f775752d255c5f6fea6b /clang/lib/Serialization/ASTWriterDecl.cpp | |
parent | 515a60daff46d2a227f42d01da299b54aa232e84 (diff) | |
download | bcm5719-llvm-d3b672c38545de350a09d06fa19bd0f7589d9345.tar.gz bcm5719-llvm-d3b672c38545de350a09d06fa19bd0f7589d9345.zip |
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.
llvm-svn: 150645
Diffstat (limited to 'clang/lib/Serialization/ASTWriterDecl.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriterDecl.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp index 7cd2f4ebed2..584ff1c1442 100644 --- a/clang/lib/Serialization/ASTWriterDecl.cpp +++ b/clang/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; } |