]> granicus.if.org Git - clang/commit
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)
commit7efb140ee16e033ca973dfcb1611d95870200b59
tree62e5703350c1b2010cb4e21d50c322c675989f8c
parent5c5a4deee7b1d950d3715d376324669f14508390
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289870 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Serialization/ASTReader.h
lib/Serialization/ASTReader.cpp
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTReaderStmt.cpp