summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclSerialization.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-09-05 01:34:33 +0000
committerTed Kremenek <kremenek@apple.com>2008-09-05 01:34:33 +0000
commit47923c7e594c9539d5369f293152b93dd0521956 (patch)
treebbe8ee4fa74b91e65255d2d5c14e1c9ba573f7fd /clang/lib/AST/DeclSerialization.cpp
parent09faf81b6c6507af95ffc134908dc560577cb027 (diff)
downloadbcm5719-llvm-47923c7e594c9539d5369f293152b93dd0521956.tar.gz
bcm5719-llvm-47923c7e594c9539d5369f293152b93dd0521956.zip
Remove "NextDecl" from RecordDecl. This change touches many files that where RecordDecl or CXXRecordDecl was constructed, always with an argument of 'NULL' for the previous declaration.
The motivation behind this change is that chaining the RecordDecls is simply unnecessary. Once we create multiple RecordDecls for the same struct/union/class, clients that care about all the declarations of the same struct can build a back map by seeing which Decls refer to the same RecordType. llvm-svn: 55821
Diffstat (limited to 'clang/lib/AST/DeclSerialization.cpp')
-rw-r--r--clang/lib/AST/DeclSerialization.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/AST/DeclSerialization.cpp b/clang/lib/AST/DeclSerialization.cpp
index 82a8fcd0f62..3f36e3ac89d 100644
--- a/clang/lib/AST/DeclSerialization.cpp
+++ b/clang/lib/AST/DeclSerialization.cpp
@@ -449,7 +449,6 @@ void RecordDecl::EmitImpl(Serializer& S) const {
ScopedDecl::EmitInRec(S);
S.EmitBool(isDefinition());
S.EmitBool(hasFlexibleArrayMember());
- S.EmitPtr(NextDecl);
S.EmitSInt(getNumMembers());
if (getNumMembers() > 0) {
assert (Members);
@@ -463,12 +462,11 @@ RecordDecl* RecordDecl::CreateImpl(Decl::Kind DK, Deserializer& D,
ASTContext& C) {
void *Mem = C.getAllocator().Allocate<RecordDecl>();
- RecordDecl* decl = new (Mem) RecordDecl(DK, 0, SourceLocation(), NULL, NULL);
+ RecordDecl* decl = new (Mem) RecordDecl(DK, 0, SourceLocation(), NULL);
decl->ScopedDecl::ReadInRec(D, C);
decl->setDefinition(D.ReadBool());
decl->setHasFlexibleArrayMember(D.ReadBool());
- D.ReadPtr(decl->NextDecl); // Allow backpatching.
decl->NumMembers = D.ReadSInt();
if (decl->getNumMembers() > 0) {
OpenPOWER on IntegriCloud