aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHWriterStmt.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-11-23 23:44:04 +0000
committerDouglas Gregor <dgregor@apple.com>2009-11-23 23:44:04 +0000
commit8cfe5a784133d90bf329fd20801824a6f71bb8ca (patch)
tree074054ca6c3e71e178729248da6006d569804241 /lib/Frontend/PCHWriterStmt.cpp
parent21affc089773edc30be43ecb0022a48acdac7093 (diff)
Explicitly track the condition variable within an "if" statement,
rather than burying it in a CXXConditionDeclExpr (that occassionally hides behind implicit conversions). Similar changes for switch, while, and do-while will follow, then the removal of CXXConditionDeclExpr. This commit is the canary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89717 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHWriterStmt.cpp')
-rw-r--r--lib/Frontend/PCHWriterStmt.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Frontend/PCHWriterStmt.cpp b/lib/Frontend/PCHWriterStmt.cpp
index 78a56db7ed..8de094a296 100644
--- a/lib/Frontend/PCHWriterStmt.cpp
+++ b/lib/Frontend/PCHWriterStmt.cpp
@@ -170,6 +170,7 @@ void PCHStmtWriter::VisitLabelStmt(LabelStmt *S) {
void PCHStmtWriter::VisitIfStmt(IfStmt *S) {
VisitStmt(S);
+ Writer.AddDeclRef(S->getConditionVariable(), Record);
Writer.WriteSubStmt(S->getCond());
Writer.WriteSubStmt(S->getThen());
Writer.WriteSubStmt(S->getElse());