aboutsummaryrefslogtreecommitdiff
path: root/lib/Serialization/ASTReaderDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-07-22 16:00:58 +0000
committerDouglas Gregor <dgregor@apple.com>2011-07-22 16:00:58 +0000
commit72a9ae18553bf8b6bdad84d2c54f73741a47e275 (patch)
tree1e2cc936c913f958803055dac054cafa5b026b2f /lib/Serialization/ASTReaderDecl.cpp
parentcb67f617dcb554864fae25f35e1f361ee9029989 (diff)
Rename ASTReader::PerFileData to serialization::Module, pulling it out
of ASTReader so it can become its own full-fledged class (eventually). No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135767 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r--lib/Serialization/ASTReaderDecl.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp
index 841c4d7d1b..30800fbe82 100644
--- a/lib/Serialization/ASTReaderDecl.cpp
+++ b/lib/Serialization/ASTReaderDecl.cpp
@@ -31,7 +31,7 @@ using namespace clang::serialization;
namespace clang {
class ASTDeclReader : public DeclVisitor<ASTDeclReader, void> {
ASTReader &Reader;
- ASTReader::PerFileData &F;
+ Module &F;
llvm::BitstreamCursor &Cursor;
const DeclID ThisDeclID;
typedef ASTReader::RecordData RecordData;
@@ -91,7 +91,7 @@ namespace clang {
CXXRecordDecl *DefinitionDecl,
const RecordData &Record, unsigned &Idx);
public:
- ASTDeclReader(ASTReader &Reader, ASTReader::PerFileData &F,
+ ASTDeclReader(ASTReader &Reader, Module &F,
llvm::BitstreamCursor &Cursor, DeclID thisDeclID,
const RecordData &Record, unsigned &Idx)
: Reader(Reader), F(F), Cursor(Cursor), ThisDeclID(thisDeclID),
@@ -101,7 +101,7 @@ namespace clang {
void Visit(Decl *D);
- void UpdateDecl(Decl *D, ASTReader::PerFileData &Module,
+ void UpdateDecl(Decl *D, Module &Module,
const RecordData &Record);
void VisitDecl(Decl *D);
@@ -239,7 +239,7 @@ void ASTDeclReader::VisitDecl(Decl *D) {
D->setUsed(Record[Idx++]);
D->setReferenced(Record[Idx++]);
D->setAccess((AccessSpecifier)Record[Idx++]);
- D->setPCHLevel(Record[Idx++] + (F.Type <= ASTReader::PCH));
+ D->setPCHLevel(Record[Idx++] + (F.Kind <= MK_PCH));
}
void ASTDeclReader::VisitTranslationUnitDecl(TranslationUnitDecl *TU) {
@@ -1349,7 +1349,7 @@ void ASTDeclReader::VisitRedeclarable(Redeclarable<T> *D) {
//===----------------------------------------------------------------------===//
/// \brief Reads attributes from the current stream position.
-void ASTReader::ReadAttributes(PerFileData &F, AttrVec &Attrs,
+void ASTReader::ReadAttributes(Module &F, AttrVec &Attrs,
const RecordData &Record, unsigned &Idx) {
for (unsigned i = 0, e = Record[Idx++]; i != e; ++i) {
Attr *New = 0;
@@ -1411,7 +1411,7 @@ ASTReader::DeclCursorForIndex(unsigned Index, DeclID ID) {
}
ASTReader::RecordLocation ASTReader::getLocalBitOffset(uint64_t GlobalOffset) {
- ContinuousRangeMap<uint64_t, PerFileData*, 4>::iterator I
+ ContinuousRangeMap<uint64_t, Module*, 4>::iterator I
= GlobalBitOffsetsMap.find(GlobalOffset);
assert(I != GlobalBitOffsetsMap.end() && "Corrupted global bit offsets map");
@@ -1728,7 +1728,7 @@ Decl *ASTReader::ReadDeclRecord(unsigned Index, DeclID ID) {
FileOffsetsTy &UpdateOffsets = UpdI->second;
for (FileOffsetsTy::iterator
I = UpdateOffsets.begin(), E = UpdateOffsets.end(); I != E; ++I) {
- PerFileData *F = I->first;
+ Module *F = I->first;
uint64_t Offset = I->second;
llvm::BitstreamCursor &Cursor = F->DeclsCursor;
SavedStreamPosition SavedPosition(Cursor);
@@ -1752,7 +1752,7 @@ Decl *ASTReader::ReadDeclRecord(unsigned Index, DeclID ID) {
return D;
}
-void ASTDeclReader::UpdateDecl(Decl *D, ASTReader::PerFileData &Module,
+void ASTDeclReader::UpdateDecl(Decl *D, Module &Module,
const RecordData &Record) {
unsigned Idx = 0;
while (Idx < Record.size()) {