diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-11-24 17:07:59 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-11-24 17:07:59 +0000 |
commit | d3d5301c44138b92bf01286183f5bf310cdd37cf (patch) | |
tree | 5e426515a870ee432cb704304b79058d3b042a24 /lib/Frontend/PCHWriterStmt.cpp | |
parent | c102297fb2857ef1af191a8e85e842cc3ac3239e (diff) |
Explicitly store the condition variable within switch statements, and
make sure that this variable is destroyed when we exit the switch
statement.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89776 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHWriterStmt.cpp')
-rw-r--r-- | lib/Frontend/PCHWriterStmt.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Frontend/PCHWriterStmt.cpp b/lib/Frontend/PCHWriterStmt.cpp index 8de094a296..064c258edc 100644 --- a/lib/Frontend/PCHWriterStmt.cpp +++ b/lib/Frontend/PCHWriterStmt.cpp @@ -181,6 +181,7 @@ void PCHStmtWriter::VisitIfStmt(IfStmt *S) { void PCHStmtWriter::VisitSwitchStmt(SwitchStmt *S) { VisitStmt(S); + Writer.AddDeclRef(S->getConditionVariable(), Record); Writer.WriteSubStmt(S->getCond()); Writer.WriteSubStmt(S->getBody()); Writer.AddSourceLocation(S->getSwitchLoc(), Record); |