[cfe-commits] r115667 - in /cfe/trunk: lib/Serialization/ASTReaderDecl.cpp lib/Serialization/ASTWriterDecl.cpp test/PCH/Inputs/namespaces.h test/PCH/namespaces.cpp

Douglas Gregor dgregor at apple.com
Tue Oct 5 13:41:58 PDT 2010


Author: dgregor
Date: Tue Oct  5 15:41:58 2010
New Revision: 115667

URL: http://llvm.org/viewvc/llvm-project?rev=115667&view=rev
Log:
Serialize the "inline" bit for namespaces. Fixes <rdar://problem/8515069>.

Modified:
    cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
    cfe/trunk/lib/Serialization/ASTWriterDecl.cpp
    cfe/trunk/test/PCH/Inputs/namespaces.h
    cfe/trunk/test/PCH/namespaces.cpp

Modified: cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReaderDecl.cpp?rev=115667&r1=115666&r2=115667&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReaderDecl.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReaderDecl.cpp Tue Oct  5 15:41:58 2010
@@ -658,6 +658,7 @@
 
 void ASTDeclReader::VisitNamespaceDecl(NamespaceDecl *D) {
   VisitNamedDecl(D);
+  D->IsInline = Record[Idx++];
   D->setLBracLoc(ReadSourceLocation(Record, Idx));
   D->setRBracLoc(ReadSourceLocation(Record, Idx));
   D->setNextNamespace(

Modified: cfe/trunk/lib/Serialization/ASTWriterDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriterDecl.cpp?rev=115667&r1=115666&r2=115667&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTWriterDecl.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriterDecl.cpp Tue Oct  5 15:41:58 2010
@@ -610,6 +610,7 @@
 
 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);

Modified: cfe/trunk/test/PCH/Inputs/namespaces.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/Inputs/namespaces.h?rev=115667&r1=115666&r2=115667&view=diff
==============================================================================
--- cfe/trunk/test/PCH/Inputs/namespaces.h (original)
+++ cfe/trunk/test/PCH/Inputs/namespaces.h Tue Oct  5 15:41:58 2010
@@ -38,3 +38,7 @@
 extern "C" {
   void ext();
 }
+
+inline namespace N4 { 
+  struct MemberOfN4;
+}

Modified: cfe/trunk/test/PCH/namespaces.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/namespaces.cpp?rev=115667&r1=115666&r2=115667&view=diff
==============================================================================
--- cfe/trunk/test/PCH/namespaces.cpp (original)
+++ cfe/trunk/test/PCH/namespaces.cpp Tue Oct  5 15:41:58 2010
@@ -40,3 +40,6 @@
 using N1::used_cls;
 used_cls s1;
 used_cls* ps1 = &s1;
+
+inline namespace N4 { }
+struct MemberOfN4 *mn4;





More information about the cfe-commits mailing list