diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-08-08 01:41:12 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-08-08 01:41:12 +0000 |
commit | 43d9d9243329b1b75d1a6efdad9f16d6fb386b8e (patch) | |
tree | d788e8c42f7e7838e8a707e93e0bbb307197f9a7 /lib/Frontend/PCHReaderStmt.cpp | |
parent | 80e4b9e0e87064a824d72b6ff89074206ecced58 (diff) |
Introduce reference counting for statements and expressions, using it
to allow sharing of nodes. Simplifies some aspects of template
instantiation, and fixes both PR3444 and <rdar://problem/6757457>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78450 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHReaderStmt.cpp')
-rw-r--r-- | lib/Frontend/PCHReaderStmt.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Frontend/PCHReaderStmt.cpp b/lib/Frontend/PCHReaderStmt.cpp index 6b97e610f5..3040a52260 100644 --- a/lib/Frontend/PCHReaderStmt.cpp +++ b/lib/Frontend/PCHReaderStmt.cpp @@ -194,6 +194,10 @@ unsigned PCHStmtReader::VisitSwitchStmt(SwitchStmt *S) { PrevSC->setNextSwitchCase(SC); else S->setSwitchCaseList(SC); + + // Retain this SwitchCase, since SwitchStmt::addSwitchCase() would + // normally retain it (but we aren't calling addSwitchCase). + SC->Retain(); PrevSC = SC; } return 2; |