diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-06-04 19:06:53 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-06-04 19:06:53 +0000 |
commit | 89f9d3a7651d1225f3f56ae3387c83b98a26da00 (patch) | |
tree | 14da82887f160245b293c572a1a4d7b3ff712a8c /lib | |
parent | c71a4915ca216847599d03cab4ed1c5086b0eb43 (diff) |
Added a field to BlockDeclRefExpr for future use.
No functionality change yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105479 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AST/StmtProfile.cpp | 2 | ||||
-rw-r--r-- | lib/Frontend/PCHReaderStmt.cpp | 3 | ||||
-rw-r--r-- | lib/Frontend/PCHWriterStmt.cpp | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/lib/AST/StmtProfile.cpp b/lib/AST/StmtProfile.cpp index ac3a9eeda6..4b17e5262e 100644 --- a/lib/AST/StmtProfile.cpp +++ b/lib/AST/StmtProfile.cpp @@ -428,6 +428,8 @@ void StmtProfiler::VisitBlockDeclRefExpr(BlockDeclRefExpr *S) { VisitDecl(S->getDecl()); ID.AddBoolean(S->isByRef()); ID.AddBoolean(S->isConstQualAdded()); + if (S->getCopyConstructorExpr()) + Visit(S->getCopyConstructorExpr()); } static Stmt::StmtClass DecodeOperatorCall(CXXOperatorCallExpr *S, diff --git a/lib/Frontend/PCHReaderStmt.cpp b/lib/Frontend/PCHReaderStmt.cpp index 3931adbe8f..d58a9730bb 100644 --- a/lib/Frontend/PCHReaderStmt.cpp +++ b/lib/Frontend/PCHReaderStmt.cpp @@ -764,7 +764,8 @@ unsigned PCHStmtReader::VisitBlockDeclRefExpr(BlockDeclRefExpr *E) { E->setLocation(SourceLocation::getFromRawEncoding(Record[Idx++])); E->setByRef(Record[Idx++]); E->setConstQualAdded(Record[Idx++]); - return 0; + E->setCopyConstructorExpr(cast_or_null<Expr>(StmtStack.back())); + return 1; } //===----------------------------------------------------------------------===// diff --git a/lib/Frontend/PCHWriterStmt.cpp b/lib/Frontend/PCHWriterStmt.cpp index a9ee43527c..b3501d0984 100644 --- a/lib/Frontend/PCHWriterStmt.cpp +++ b/lib/Frontend/PCHWriterStmt.cpp @@ -688,6 +688,7 @@ void PCHStmtWriter::VisitBlockDeclRefExpr(BlockDeclRefExpr *E) { Writer.AddSourceLocation(E->getLocation(), Record); Record.push_back(E->isByRef()); Record.push_back(E->isConstQualAdded()); + Writer.WriteSubStmt(E->getCopyConstructorExpr()); Code = pch::EXPR_BLOCK_DECL_REF; } |