]> granicus.if.org Git - clang/commit
Support C++ friend declarations for PCH.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 29 Jun 2010 22:47:00 +0000 (22:47 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 29 Jun 2010 22:47:00 +0000 (22:47 +0000)
commit6764334dfa73d67cbbb1b1fc8fe00440aad00f2a
tree2ef6ea36799089d92fdb3102551d0a178d67204d
parentd98a2ab9275f896df49e42ea4e4b8871610e0f45
Support C++ friend declarations for PCH.

This commit 'introduces' a slightly different way to restore the state of the AST object.
It makes PCHDeclReader/PCHDeclWriter friends and gives them access to the private members of the object.
The rationale is to avoid using/modifying the AST interfaces for PCH read/write so that to:

-Avoid complications with objects that have side-effects during creation or when using some setters.
-Not 'pollute' the AST interface with methods only used by the PCH reader/writer
-Allow AST objects to be read-only.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107219 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/DeclBase.h
include/clang/AST/DeclCXX.h
include/clang/AST/DeclFriend.h
lib/AST/DeclFriend.cpp
lib/Frontend/PCHReaderDecl.cpp
lib/Frontend/PCHWriter.cpp
lib/Frontend/PCHWriterDecl.cpp
test/PCH/cxx-friends.cpp [new file with mode: 0644]
test/PCH/cxx-friends.h [new file with mode: 0644]