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.

llvm-svn: 107219
9 files changed
tree: 071f643dbf3e1e54a0df522cef266277a232d76a
  1. clang/
  2. compiler-rt/
  3. libcxx/
  4. lldb/
  5. llvm/