aboutsummaryrefslogtreecommitdiff
path: root/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
commitdf042e6c2bf06b2d9ed53c52469599ac1bd93a3f (patch)
tree2aa6d45304f3160de3954f85907c1ea047ccfba4 /lib/AST/DeclSerialization.cpp
parent3a9a3e112ac02f8a261293cbe605db2e5d8732d3 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclSerialization.cpp')
-rw-r--r--lib/AST/DeclSerialization.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/AST/DeclSerialization.cpp b/lib/AST/DeclSerialization.cpp
index 82a8fcd0f6..3f36e3ac89 100644
--- a/lib/AST/DeclSerialization.cpp
+++ b/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) {