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/PCHReaderStmt.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/PCHReaderStmt.cpp')
-rw-r--r-- | lib/Frontend/PCHReaderStmt.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Frontend/PCHReaderStmt.cpp b/lib/Frontend/PCHReaderStmt.cpp index fb95584b2a..1e9f72bd6e 100644 --- a/lib/Frontend/PCHReaderStmt.cpp +++ b/lib/Frontend/PCHReaderStmt.cpp @@ -188,6 +188,7 @@ unsigned PCHStmtReader::VisitIfStmt(IfStmt *S) { unsigned PCHStmtReader::VisitSwitchStmt(SwitchStmt *S) { VisitStmt(S); + S->setConditionVariable(cast_or_null<VarDecl>(Reader.GetDecl(Record[Idx++]))); S->setCond(cast<Expr>(StmtStack[StmtStack.size() - 2])); S->setBody(StmtStack.back()); S->setSwitchLoc(SourceLocation::getFromRawEncoding(Record[Idx++])); |