Switch NamespaceDecl from its own hand-rolled redeclaration chain over
authorDouglas Gregor <dgregor@apple.com>
Sat, 7 Jan 2012 09:11:48 +0000 (09:11 +0000)
committerDouglas Gregor <dgregor@apple.com>
Sat, 7 Jan 2012 09:11:48 +0000 (09:11 +0000)
commite57e752b71f0254e697156ed8c5c15040f53e6d6
treea6b6d287391aff05c487f0cb9043cbb91353c5e7
parent43a1bd6ac7caf826c024eb05507b3c8fe8956dc3
Switch NamespaceDecl from its own hand-rolled redeclaration chain over
to Redeclarable<NamespaceDecl>, so that we benefit from the improveed
redeclaration deserialization and merging logic provided by
Redeclarable<T>. Otherwise, no functionality change.

As a drive-by fix, collapse the "inline" bit into the low bit of the
original namespace/anonymous namespace, saving 8 bytes per
NamespaceDecl on x86_64.

llvm-svn: 147729
14 files changed:
clang/include/clang/AST/Decl.h
clang/include/clang/AST/DeclBase.h
clang/lib/AST/ASTImporter.cpp
clang/lib/AST/DeclBase.cpp
clang/lib/AST/DeclCXX.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/lib/Sema/SemaLookup.cpp
clang/lib/Serialization/ASTReaderDecl.cpp
clang/lib/Serialization/ASTWriterDecl.cpp
clang/test/Modules/Inputs/module.map
clang/test/Modules/Inputs/namespaces-left.h [new file with mode: 0644]
clang/test/Modules/Inputs/namespaces-right.h [new file with mode: 0644]
clang/test/Modules/Inputs/namespaces-top.h [new file with mode: 0644]
clang/test/Modules/namespaces.cpp [new file with mode: 0644]