[cfe-commits] r75592 - in /cfe/trunk/lib/Frontend: PCHReaderDecl.cpp PCHWriterDecl.cpp

Argiris Kirtzidis akyrtzi at gmail.com
Mon Jul 13 20:18:02 PDT 2009


Author: akirtzidis
Date: Mon Jul 13 22:18:02 2009
New Revision: 75592

URL: http://llvm.org/viewvc/llvm-project?rev=75592&view=rev
Log:
Read/write TagDecl's RBraceLoc from/to PCH files.

Modified:
    cfe/trunk/lib/Frontend/PCHReaderDecl.cpp
    cfe/trunk/lib/Frontend/PCHWriterDecl.cpp

Modified: cfe/trunk/lib/Frontend/PCHReaderDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReaderDecl.cpp?rev=75592&r1=75591&r2=75592&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/PCHReaderDecl.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHReaderDecl.cpp Mon Jul 13 22:18:02 2009
@@ -116,6 +116,7 @@
   TD->setDefinition(Record[Idx++]);
   TD->setTypedefForAnonDecl(
                     cast_or_null<TypedefDecl>(Reader.GetDecl(Record[Idx++])));
+  TD->setRBraceLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
 }
 
 void PCHDeclReader::VisitEnumDecl(EnumDecl *ED) {

Modified: cfe/trunk/lib/Frontend/PCHWriterDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHWriterDecl.cpp?rev=75592&r1=75591&r2=75592&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/PCHWriterDecl.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHWriterDecl.cpp Mon Jul 13 22:18:02 2009
@@ -112,6 +112,7 @@
   Record.push_back((unsigned)D->getTagKind()); // FIXME: stable encoding
   Record.push_back(D->isDefinition());
   Writer.AddDeclRef(D->getTypedefForAnonDecl(), Record);
+  Writer.AddSourceLocation(D->getRBraceLoc(), Record);
 }
 
 void PCHDeclWriter::VisitEnumDecl(EnumDecl *D) {





More information about the cfe-commits mailing list