Serialize the "inline" bit for namespaces. Fixes <rdar://problem/8515069>.

llvm-svn: 115667
This commit is contained in:
Douglas Gregor 2010-10-05 20:41:58 +00:00
parent 671bab1c7d
commit 44e5c1f16c
4 changed files with 9 additions and 0 deletions

View File

@ -658,6 +658,7 @@ void ASTDeclReader::VisitLinkageSpecDecl(LinkageSpecDecl *D) {
void ASTDeclReader::VisitNamespaceDecl(NamespaceDecl *D) {
VisitNamedDecl(D);
D->IsInline = Record[Idx++];
D->setLBracLoc(ReadSourceLocation(Record, Idx));
D->setRBracLoc(ReadSourceLocation(Record, Idx));
D->setNextNamespace(

View File

@ -610,6 +610,7 @@ void ASTDeclWriter::VisitLinkageSpecDecl(LinkageSpecDecl *D) {
void ASTDeclWriter::VisitNamespaceDecl(NamespaceDecl *D) {
VisitNamedDecl(D);
Record.push_back(D->isInline());
Writer.AddSourceLocation(D->getLBracLoc(), Record);
Writer.AddSourceLocation(D->getRBracLoc(), Record);
Writer.AddDeclRef(D->getNextNamespace(), Record);

View File

@ -38,3 +38,7 @@ using namespace N2::Inner;
extern "C" {
void ext();
}
inline namespace N4 {
struct MemberOfN4;
}

View File

@ -40,3 +40,6 @@ void (*pused)() = used_func;
using N1::used_cls;
used_cls s1;
used_cls* ps1 = &s1;
inline namespace N4 { }
struct MemberOfN4 *mn4;