Started work on clang object serialization.  Experimental
serialization logic as well as driver code is now in
Driver/SerializationTest.cpp.  The status of this code is that it
should be used by no clients.

Added --test-pickling option to driver to run the serialization code.

Modified IdentifierInfo and IdentifierTable to have friend classes
that permit object serialization.  Such friendship may not be needed
in the final design.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43052 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index 6e8dd9e..082f5ed 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -60,6 +60,7 @@
   WarnDeadStores,               // Run DeadStores checker on parsed ASTs.
   WarnDeadStoresCheck,          // Check diagnostics for "DeadStores".
   WarnUninitVals,               // Run UnitializedVariables checker.
+  TestSerialization,            // Run experimental serialization code.
   ParsePrintCallbacks,          // Parse and print each callback.
   ParseSyntaxOnly,              // Parse and perform semantic analysis.
   ParseNoop,                    // Parse with noop callbacks.
@@ -100,6 +101,8 @@
                         "Flag warnings of stores to dead variables."),
              clEnumValN(WarnUninitVals, "warn-uninit-values",
                         "Flag warnings of uses of unitialized variables."),
+             clEnumValN(TestSerialization, "test-pickling",
+                        "Run prototype serializtion code."),
              clEnumValN(EmitLLVM, "emit-llvm",
                         "Build ASTs then convert to LLVM, emit .ll file"),
              clEnumValN(RewriteTest, "rewrite-test",
@@ -802,6 +805,10 @@
     Consumer = CreateUnitValsChecker(PP.getDiagnostics());
     break;
 
+  case TestSerialization:
+    Consumer = CreateSerializationTest();
+    break;
+      
   case EmitLLVM:
     Consumer = CreateLLVMEmitter(PP.getDiagnostics());
     break;