Add a class ASTRecordReader which wraps an ASTReader, a RecordData, and ModuleFile.
authorDavid L. Jones <dlj@google.com>
Thu, 15 Dec 2016 20:53:26 +0000 (20:53 +0000)
committerDavid L. Jones <dlj@google.com>
Thu, 15 Dec 2016 20:53:26 +0000 (20:53 +0000)
commitc4808b9e0ada45aaef7f103f50a714c79f4ff2d5
tree76dda0821fd06bdf2298ee0c8f485eaaee075344
parent1aa3ef9268d9a0e2133961bec6ad0a53bd2cf445
Add a class ASTRecordReader which wraps an ASTReader, a RecordData, and ModuleFile.

Summary:
When reading an ASTRecord, each RecordData is logically contained within a
single ModuleFile, and global(er) state is contained by a single ASTReader. This
means that any operations that read from a RecordData and reference an ASTReader
or a ModuleFile, will always reference the same ASTReader or ModuleFile.
ASTRecordReader groups these together so that parameters don't need to be
duplicated ad infinitum. Most uses of the Idx variable seem to be redunant
aliases as well, but I'll leave that for now.

Reviewers: rsmith

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D27784

llvm-svn: 289870
clang/include/clang/Serialization/ASTReader.h
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTReaderDecl.cpp
clang/lib/Serialization/ASTReaderStmt.cpp