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
diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp
index 2fe69fc..0cce7db 100644
--- a/lib/AST/DeclCXX.cpp
+++ b/lib/AST/DeclCXX.cpp
@@ -27,8 +27,7 @@
}
CXXRecordDecl *CXXRecordDecl::Create(ASTContext &C, TagKind TK, DeclContext *DC,
- SourceLocation L, IdentifierInfo *Id,
- CXXRecordDecl *PrevDecl) {
+ SourceLocation L, IdentifierInfo *Id) {
Kind DK;
switch (TK) {
default: assert(0 && "Invalid TagKind!");
@@ -38,7 +37,7 @@
case TK_class: DK = CXXClass; break;
}
void *Mem = C.getAllocator().Allocate<CXXRecordDecl>();
- return new (Mem) CXXRecordDecl(DK, DC, L, Id, PrevDecl);
+ return new (Mem) CXXRecordDecl(DK, DC, L, Id);
}
CXXMethodDecl *