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 | 2c742024ff2c41eb01b85bb574f5b0855a24924a (patch) | |
tree | 480b8751bcdf556d23c3c55de0601c4c693c3fb3 /clang/lib/Frontend/PCHReaderStmt.cpp | |
parent | b94284b5e2aed610005e6d5698480837e0512319 (diff) | |
download | bcm5719-llvm-2c742024ff2c41eb01b85bb574f5b0855a24924a.tar.gz bcm5719-llvm-2c742024ff2c41eb01b85bb574f5b0855a24924a.zip |
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>.
llvm-svn: 78450
Diffstat (limited to 'clang/lib/Frontend/PCHReaderStmt.cpp')
-rw-r--r-- | clang/lib/Frontend/PCHReaderStmt.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Frontend/PCHReaderStmt.cpp b/clang/lib/Frontend/PCHReaderStmt.cpp index 6b97e610f57..3040a52260b 100644 --- a/clang/lib/Frontend/PCHReaderStmt.cpp +++ b/clang/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; |