summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHWriter.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-15 23:33:31 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-15 23:33:31 +0000
commit8693ec4e58197b3ff027309e6a9cc0aa2932b2c3 (patch)
treefea772342a2cd20fed3b0451e4c086b9f0bb453e /clang/lib/Frontend/PCHWriter.cpp
parenta71daa83c6e756205cfd77094530325d21d371c7 (diff)
downloadbcm5719-llvm-8693ec4e58197b3ff027309e6a9cc0aa2932b2c3.tar.gz
bcm5719-llvm-8693ec4e58197b3ff027309e6a9cc0aa2932b2c3.zip
PCH support for TypesCompatibleExpr, ChooseExpr, and GNUNullExpr.
llvm-svn: 69242
Diffstat (limited to 'clang/lib/Frontend/PCHWriter.cpp')
-rw-r--r--clang/lib/Frontend/PCHWriter.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/clang/lib/Frontend/PCHWriter.cpp b/clang/lib/Frontend/PCHWriter.cpp
index 612eb23b529..dc5aabdd5ba 100644
--- a/clang/lib/Frontend/PCHWriter.cpp
+++ b/clang/lib/Frontend/PCHWriter.cpp
@@ -466,6 +466,9 @@ namespace {
void VisitCStyleCastExpr(CStyleCastExpr *E);
void VisitExtVectorElementExpr(ExtVectorElementExpr *E);
void VisitVAArgExpr(VAArgExpr *E);
+ void VisitTypesCompatibleExpr(TypesCompatibleExpr *E);
+ void VisitChooseExpr(ChooseExpr *E);
+ void VisitGNUNullExpr(GNUNullExpr *E);
};
}
@@ -655,6 +658,31 @@ void PCHStmtWriter::VisitVAArgExpr(VAArgExpr *E) {
Code = pch::EXPR_VA_ARG;
}
+void PCHStmtWriter::VisitTypesCompatibleExpr(TypesCompatibleExpr *E) {
+ VisitExpr(E);
+ Writer.AddTypeRef(E->getArgType1(), Record);
+ Writer.AddTypeRef(E->getArgType2(), Record);
+ Writer.AddSourceLocation(E->getBuiltinLoc(), Record);
+ Writer.AddSourceLocation(E->getRParenLoc(), Record);
+ Code = pch::EXPR_TYPES_COMPATIBLE;
+}
+
+void PCHStmtWriter::VisitChooseExpr(ChooseExpr *E) {
+ VisitExpr(E);
+ Writer.WriteSubExpr(E->getCond());
+ Writer.WriteSubExpr(E->getLHS());
+ Writer.WriteSubExpr(E->getRHS());
+ Writer.AddSourceLocation(E->getBuiltinLoc(), Record);
+ Writer.AddSourceLocation(E->getRParenLoc(), Record);
+ Code = pch::EXPR_CHOOSE;
+}
+
+void PCHStmtWriter::VisitGNUNullExpr(GNUNullExpr *E) {
+ VisitExpr(E);
+ Writer.AddSourceLocation(E->getTokenLocation(), Record);
+ Code = pch::EXPR_GNU_NULL;
+}
+
//===----------------------------------------------------------------------===//
// PCHWriter Implementation
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud