]> granicus.if.org Git - clang/commitdiff
Update PCH serialization of FunctionDecl flags.
authorDaniel Dunbar <daniel@zuster.org>
Tue, 22 Sep 2009 05:38:14 +0000 (05:38 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 22 Sep 2009 05:38:14 +0000 (05:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82526 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/PCHReaderDecl.cpp
lib/Frontend/PCHWriterDecl.cpp
test/Frontend/ast-main.c

index 67ffabba863fc2362e68a83b6adce8c95673f254..77721bdf629e92864640a32e6fbaf88ffeb23b1c 100644 (file)
@@ -230,6 +230,9 @@ void PCHDeclReader::VisitFunctionDecl(FunctionDecl *FD) {
   FD->setHasInheritedPrototype(Record[Idx++]);
   FD->setHasWrittenPrototype(Record[Idx++]);
   FD->setDeleted(Record[Idx++]);
+  FD->setTrivial(Record[Idx++]);
+  FD->setCopyAssignment(Record[Idx++]);
+  FD->setHasImplicitReturnZero(Record[Idx++]);
   FD->setLocEnd(SourceLocation::getFromRawEncoding(Record[Idx++]));
   // FIXME: C++ TemplateOrInstantiation
   unsigned NumParams = Record[Idx++];
index 3aacab33966f863ab5ef33e9a10acdd8066704a3..6261db5ff6f98c6a06736843c01e3ffe6d2cfc51 100644 (file)
@@ -230,6 +230,9 @@ void PCHDeclWriter::VisitFunctionDecl(FunctionDecl *D) {
   Record.push_back(D->hasInheritedPrototype());
   Record.push_back(D->hasWrittenPrototype());
   Record.push_back(D->isDeleted());
+  Record.push_back(D->isTrivial());
+  Record.push_back(D->isCopyAssignment());
+  Record.push_back(D->hasImplicitReturnZero());
   Writer.AddSourceLocation(D->getLocEnd(), Record);
   // FIXME: C++ TemplateOrInstantiation
   Record.push_back(D->param_size());
index a08eb6bf731e48fbad6d3dcc6c8576ded5b04b8f..78314067389986033f7fb2be7a8fc37bec1a9a0d 100644 (file)
@@ -1,8 +1,7 @@
-// RUN: clang -emit-llvm -S -o %t1.ll %s &&
+// RUN: clang -emit-llvm -S -o %t1.ll -x c - < %s &&
 // RUN: clang -emit-ast -o %t.ast %s &&
-// RUN: clang -emit-llvm -S -o %t2.ll %t.ast &&
+// RUN: clang -emit-llvm -S -o %t2.ll -x ast - < %t.ast &&
 // RUN: diff %t1.ll %t2.ll
-// XFAIL: *
 
 int main() {
   return 0;