diff options
author | Chris Lattner <sabre@nondot.org> | 2010-05-09 06:40:08 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-05-09 06:40:08 +0000 |
commit | 030854b95f7bfd86aaa8afd9ae1aff9768a37e9a (patch) | |
tree | 691c8cd1a296c9461e34eabc9b6c882410a33022 /lib/Frontend/PCHWriterDecl.cpp | |
parent | 2fbdfcdf3bbf7b941853d38b123930755e837437 (diff) |
pch'ify default argument definitions and uses.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103376 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHWriterDecl.cpp')
-rw-r--r-- | lib/Frontend/PCHWriterDecl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Frontend/PCHWriterDecl.cpp b/lib/Frontend/PCHWriterDecl.cpp index a898c705e2..28a10ad6b0 100644 --- a/lib/Frontend/PCHWriterDecl.cpp +++ b/lib/Frontend/PCHWriterDecl.cpp @@ -416,7 +416,7 @@ void PCHDeclWriter::VisitVarDecl(VarDecl *D) { Record.push_back(D->isDeclaredInCondition()); Record.push_back(D->isExceptionVariable()); Writer.AddDeclRef(D->getPreviousDeclaration(), Record); - Record.push_back(D->getInit()? 1 : 0); + Record.push_back(D->getInit() ? 1 : 0); if (D->getInit()) Writer.AddStmt(D->getInit()); Code = pch::DECL_VAR; @@ -445,7 +445,8 @@ void PCHDeclWriter::VisitParmVarDecl(ParmVarDecl *D) { D->getStorageClass() == 0 && !D->hasCXXDirectInitializer() && // Can params have this ever? D->getObjCDeclQualifier() == 0 && - !D->hasInheritedDefaultArg()) + !D->hasInheritedDefaultArg() && + D->getInit() == 0) // No default expr. AbbrevToUse = Writer.getParmVarDeclAbbrev(); // Check things we know are true of *every* PARM_VAR_DECL, which is more than @@ -456,7 +457,6 @@ void PCHDeclWriter::VisitParmVarDecl(ParmVarDecl *D) { assert(!D->isDeclaredInCondition() && "PARM_VAR_DECL can't be in condition"); assert(!D->isExceptionVariable() && "PARM_VAR_DECL can't be exception var"); assert(D->getPreviousDeclaration() == 0 && "PARM_VAR_DECL can't be redecl"); - assert(D->getInit() == 0 && "PARM_VAR_DECL never has init"); } void PCHDeclWriter::VisitFileScopeAsmDecl(FileScopeAsmDecl *D) { |