summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriterDecl.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-05-02 00:30:12 +0000
committerJohn McCall <rjmccall@apple.com>2011-05-02 00:30:12 +0000
commit824908373efa1805acefff55d1c1ed140336db75 (patch)
tree9b10a8d5c32b02d804d21cb05f1064270b93f200 /clang/lib/Serialization/ASTWriterDecl.cpp
parent8d26bb0899dc596067b2caf810f0290ffa1ee2c8 (diff)
downloadbcm5719-llvm-824908373efa1805acefff55d1c1ed140336db75.tar.gz
bcm5719-llvm-824908373efa1805acefff55d1c1ed140336db75.zip
Revise the representation of parameter scope data so that the
scope depth overlaps with the ObjCDeclQualifier, dropping memory usage back to previous levels. llvm-svn: 130671
Diffstat (limited to 'clang/lib/Serialization/ASTWriterDecl.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriterDecl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp
index 63cffb243a4..1ca00a32f82 100644
--- a/clang/lib/Serialization/ASTWriterDecl.cpp
+++ b/clang/lib/Serialization/ASTWriterDecl.cpp
@@ -587,6 +587,7 @@ void ASTDeclWriter::VisitImplicitParamDecl(ImplicitParamDecl *D) {
void ASTDeclWriter::VisitParmVarDecl(ParmVarDecl *D) {
VisitVarDecl(D);
+ Record.push_back(D->isObjCMethodParameter());
Record.push_back(D->getFunctionScopeDepth());
Record.push_back(D->getFunctionScopeIndex());
Record.push_back(D->getObjCDeclQualifier()); // FIXME: stable encoding
@@ -608,6 +609,7 @@ void ASTDeclWriter::VisitParmVarDecl(ParmVarDecl *D) {
D->getPCHLevel() == 0 &&
D->getStorageClass() == 0 &&
!D->hasCXXDirectInitializer() && // Can params have this ever?
+ D->getFunctionScopeDepth() == 0 &&
D->getObjCDeclQualifier() == 0 &&
!D->isKNRPromoted() &&
!D->hasInheritedDefaultArg() &&
@@ -1176,6 +1178,7 @@ void ASTWriter::WriteDeclsBlockAbbrevs() {
Abv->Add(BitCodeAbbrevOp(0)); // HasInit
Abv->Add(BitCodeAbbrevOp(0)); // HasMemberSpecializationInfo
// ParmVarDecl
+ Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // IsObjCMethodParameter
Abv->Add(BitCodeAbbrevOp(0)); // ScopeDepth
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // ScopeIndex
Abv->Add(BitCodeAbbrevOp(0)); // ObjCDeclQualifier
OpenPOWER on IntegriCloud