summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization
diff options
context:
space:
mode:
authorDavid L. Jones <dlj@google.com>2017-01-24 01:04:30 +0000
committerDavid L. Jones <dlj@google.com>2017-01-24 01:04:30 +0000
commit267b884e81ce1b8d34082c846466298f98e35fc3 (patch)
tree84fcacdf312bb68c7d149d633e55b50561fe2375 /clang/lib/Serialization
parent9a6d49f4516f8707a74ac0256ebe35ebb120ed37 (diff)
downloadbcm5719-llvm-267b884e81ce1b8d34082c846466298f98e35fc3.tar.gz
bcm5719-llvm-267b884e81ce1b8d34082c846466298f98e35fc3.zip
Switch TableGen to emit calls to ASTRecordReader for AttrPCHRead.
Summary: This patch changes TableGen-generated code in AttrPCHRead to call functions on ASTRecordReader, instead of passing separate parameters to ASTReader. This is a follow-up to r290217. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28007 llvm-svn: 292868
Diffstat (limited to 'clang/lib/Serialization')
-rw-r--r--clang/lib/Serialization/ASTReaderDecl.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp
index c6919193391..4a7e24c007a 100644
--- a/clang/lib/Serialization/ASTReaderDecl.cpp
+++ b/clang/lib/Serialization/ASTReaderDecl.cpp
@@ -1831,7 +1831,7 @@ void ASTDeclReader::VisitImportDecl(ImportDecl *D) {
SourceLocation *StoredLocs = D->getTrailingObjects<SourceLocation>();
for (unsigned I = 0, N = Record.back(); I != N; ++I)
StoredLocs[I] = ReadSourceLocation();
- (void)Record.readInt(); // The number of stored source locations.
+ Record.skipInts(1); // The number of stored source locations.
}
void ASTDeclReader::VisitAccessSpecDecl(AccessSpecDecl *D) {
@@ -2471,12 +2471,11 @@ void ASTDeclReader::VisitOMPCapturedExprDecl(OMPCapturedExprDecl *D) {
//===----------------------------------------------------------------------===//
/// \brief Reads attributes from the current stream position.
-void ASTReader::ReadAttributes(ModuleFile &F, AttrVec &Attrs,
- const RecordData &Record, unsigned &Idx) {
- for (unsigned i = 0, e = Record[Idx++]; i != e; ++i) {
+void ASTReader::ReadAttributes(ASTRecordReader &Record, AttrVec &Attrs) {
+ for (unsigned i = 0, e = Record.readInt(); i != e; ++i) {
Attr *New = nullptr;
- attr::Kind Kind = (attr::Kind)Record[Idx++];
- SourceRange Range = ReadSourceRange(F, Record, Idx);
+ attr::Kind Kind = (attr::Kind)Record.readInt();
+ SourceRange Range = Record.readSourceRange();
#include "clang/Serialization/AttrPCHRead.inc"
OpenPOWER on IntegriCloud