From: Daniel Dunbar Date: Tue, 22 Sep 2009 05:38:14 +0000 (+0000) Subject: Update PCH serialization of FunctionDecl flags. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7f8b57aa3558ed079358637a2a48db7d2fefb4b2;p=clang Update PCH serialization of FunctionDecl flags. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82526 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/PCHReaderDecl.cpp b/lib/Frontend/PCHReaderDecl.cpp index 67ffabba86..77721bdf62 100644 --- a/lib/Frontend/PCHReaderDecl.cpp +++ b/lib/Frontend/PCHReaderDecl.cpp @@ -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++]; diff --git a/lib/Frontend/PCHWriterDecl.cpp b/lib/Frontend/PCHWriterDecl.cpp index 3aacab3396..6261db5ff6 100644 --- a/lib/Frontend/PCHWriterDecl.cpp +++ b/lib/Frontend/PCHWriterDecl.cpp @@ -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()); diff --git a/test/Frontend/ast-main.c b/test/Frontend/ast-main.c index a08eb6bf73..7831406738 100644 --- a/test/Frontend/ast-main.c +++ b/test/Frontend/ast-main.c @@ -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;