Parse @encode expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41273 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/StmtDumper.cpp b/AST/StmtDumper.cpp
index 22af23c..cf1eab1 100644
--- a/AST/StmtDumper.cpp
+++ b/AST/StmtDumper.cpp
@@ -503,6 +503,14 @@
   fprintf(F, ")");
 }
 
+void StmtDumper::VisitObjCEncodeExpr(ObjCEncodeExpr *Node) {
+  DumpExpr(Node);
+ 
+  fprintf(F, " ");
+  DumpType(Node->getEncodedType());
+  fprintf(F, ")");  
+}
+
 //===----------------------------------------------------------------------===//
 // Stmt method implementations
 //===----------------------------------------------------------------------===//
diff --git a/AST/StmtPrinter.cpp b/AST/StmtPrinter.cpp
index 6b2fce8..2c77f13 100644
--- a/AST/StmtPrinter.cpp
+++ b/AST/StmtPrinter.cpp
@@ -518,6 +518,11 @@
   VisitStringLiteral(Node->getString());
 }
 
+void StmtPrinter::VisitObjCEncodeExpr(ObjCEncodeExpr *Node) {
+  OS << "@encode(";
+  OS << Node->getEncodedType().getAsString() << ")";
+}
+
 //===----------------------------------------------------------------------===//
 // Stmt method implementations
 //===----------------------------------------------------------------------===//