diff options
| author | John McCall <rjmccall@apple.com> | 2010-06-04 11:21:44 +0000 | 
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-06-04 11:21:44 +0000 | 
| commit | a3ccba0417f909fd7292af0e9e788e924046d85c (patch) | |
| tree | 2a4baa247ce2652b53c610890dddc7496f5b3ee2 /clang/lib/Frontend | |
| parent | 52d6350dd202a521050164afb75ceadccbe9a084 (diff) | |
| download | bcm5719-llvm-a3ccba0417f909fd7292af0e9e788e924046d85c.tar.gz bcm5719-llvm-a3ccba0417f909fd7292af0e9e788e924046d85c.zip | |
Restructure how we interpret block-literal declarators.  Correctly handle
the case where we pick up block arguments from a typedef.  Save the block
signature as it was written, and preserve same through PCH.
llvm-svn: 105466
Diffstat (limited to 'clang/lib/Frontend')
| -rw-r--r-- | clang/lib/Frontend/PCHReaderDecl.cpp | 1 | ||||
| -rw-r--r-- | clang/lib/Frontend/PCHWriterDecl.cpp | 1 | 
2 files changed, 2 insertions, 0 deletions
| diff --git a/clang/lib/Frontend/PCHReaderDecl.cpp b/clang/lib/Frontend/PCHReaderDecl.cpp index 606e852385d..8b7b66c2b85 100644 --- a/clang/lib/Frontend/PCHReaderDecl.cpp +++ b/clang/lib/Frontend/PCHReaderDecl.cpp @@ -462,6 +462,7 @@ void PCHDeclReader::VisitFileScopeAsmDecl(FileScopeAsmDecl *AD) {  void PCHDeclReader::VisitBlockDecl(BlockDecl *BD) {    VisitDecl(BD);    BD->setBody(cast_or_null<CompoundStmt>(Reader.ReadDeclStmt())); +  BD->setSignatureAsWritten(Reader.GetTypeSourceInfo(Record, Idx));    unsigned NumParams = Record[Idx++];    llvm::SmallVector<ParmVarDecl *, 16> Params;    Params.reserve(NumParams); diff --git a/clang/lib/Frontend/PCHWriterDecl.cpp b/clang/lib/Frontend/PCHWriterDecl.cpp index d0a01f083f9..8eeef7c741e 100644 --- a/clang/lib/Frontend/PCHWriterDecl.cpp +++ b/clang/lib/Frontend/PCHWriterDecl.cpp @@ -471,6 +471,7 @@ void PCHDeclWriter::VisitFileScopeAsmDecl(FileScopeAsmDecl *D) {  void PCHDeclWriter::VisitBlockDecl(BlockDecl *D) {    VisitDecl(D);    Writer.AddStmt(D->getBody()); +  Writer.AddTypeSourceInfo(D->getSignatureAsWritten(), Record);    Record.push_back(D->param_size());    for (FunctionDecl::param_iterator P = D->param_begin(), PEnd = D->param_end();         P != PEnd; ++P) | 

