]> granicus.if.org Git - clang/commitdiff
Read/write TagDecl's RBraceLoc from/to PCH files.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 14 Jul 2009 03:18:02 +0000 (03:18 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 14 Jul 2009 03:18:02 +0000 (03:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75592 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/PCHReaderDecl.cpp
lib/Frontend/PCHWriterDecl.cpp

index 308d73febf8af3f66e4626290cf936353ca2a011..e11729b6628079d65e68acbed590f864257bd8a9 100644 (file)
@@ -116,6 +116,7 @@ void PCHDeclReader::VisitTagDecl(TagDecl *TD) {
   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) {
index c588a181dca5423684c0c253867219d533edf01c..6aed0e900950f3181c2dca9b1ee50375a63689b7 100644 (file)
@@ -112,6 +112,7 @@ void PCHDeclWriter::VisitTagDecl(TagDecl *D) {
   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) {