Add PCH support for ImplicitCastExprs. This is the first expression
kind PCH handles that has an expression as an operand, so most of this
work is in the infrastructure to rebuild expression trees from the
serialized representation. We now store expressions in post-order
(e.g., Reverse Polish Notation), so that we can easily rebuild the
appropriate expression tree.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69101 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/clang-cc/ASTConsumers.cpp b/tools/clang-cc/ASTConsumers.cpp
index 74683e3..61a9e44 100644
--- a/tools/clang-cc/ASTConsumers.cpp
+++ b/tools/clang-cc/ASTConsumers.cpp
@@ -190,7 +190,14 @@
     std::string Name = ND->getNameAsString();
     // This forms: "int a".
     dyn_cast<ValueDecl>(ND)->getType().getAsStringInternal(Name);
-    Out << Name << ";\n";
+    Out << Name;
+    if (VarDecl *Var = dyn_cast<VarDecl>(ND)) {
+      if (Var->getInit()) {
+        Out << " = ";
+        Var->getInit()->printPretty(Out);
+      }
+    }
+    Out << ";\n";
     break;
   }
   case Decl::Namespace: