Template instantiation for switch statements


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71916 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/PCHReaderStmt.cpp b/lib/Frontend/PCHReaderStmt.cpp
index 2daedbf..a729003 100644
--- a/lib/Frontend/PCHReaderStmt.cpp
+++ b/lib/Frontend/PCHReaderStmt.cpp
@@ -147,6 +147,8 @@
   S->setRHS(cast_or_null<Expr>(StmtStack[StmtStack.size() - 2]));
   S->setSubStmt(StmtStack.back());
   S->setCaseLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
+  S->setEllipsisLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
+  S->setColonLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
   return 3;
 }
 
@@ -154,6 +156,7 @@
   VisitSwitchCase(S);
   S->setSubStmt(StmtStack.back());
   S->setDefaultLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
+  S->setColonLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
   return 1;
 }
 
diff --git a/lib/Frontend/PCHWriterStmt.cpp b/lib/Frontend/PCHWriterStmt.cpp
index 783cd56..575e843 100644
--- a/lib/Frontend/PCHWriterStmt.cpp
+++ b/lib/Frontend/PCHWriterStmt.cpp
@@ -140,6 +140,8 @@
   Writer.WriteSubStmt(S->getRHS());
   Writer.WriteSubStmt(S->getSubStmt());
   Writer.AddSourceLocation(S->getCaseLoc(), Record);
+  Writer.AddSourceLocation(S->getEllipsisLoc(), Record);
+  Writer.AddSourceLocation(S->getColonLoc(), Record);
   Code = pch::STMT_CASE;
 }
 
@@ -147,6 +149,7 @@
   VisitSwitchCase(S);
   Writer.WriteSubStmt(S->getSubStmt());
   Writer.AddSourceLocation(S->getDefaultLoc(), Record);
+  Writer.AddSourceLocation(S->getColonLoc(), Record);
   Code = pch::STMT_DEFAULT;
 }