Added a new OptionValue subclass for lldb::Format: OptionValueFormat. Added
new OptionGroup subclasses for:
- output file for use with options: 
        long opts: --outfile <path> --append--output
        short opts: -o <path> -A
        
- format for use with options:
        long opts: --format <format>

- variable object display controls for depth, pointer depth, wether to show
  types, show summary, show location, flat output, use objc "po" style summary.
  
Modified ValueObjectMemory to be able to be created either with a TypeSP or
a ClangASTType.

Switched "memory read" over to use OptionGroup subclasses: one for the outfile
options, one for the command specific options, and one for the format.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130334 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Interpreter/OptionGroupFormat.cpp b/source/Interpreter/OptionGroupFormat.cpp
new file mode 100644
index 0000000..0bc29ee
--- /dev/null
+++ b/source/Interpreter/OptionGroupFormat.cpp
@@ -0,0 +1,75 @@
+//===-- OptionGroupFormat.cpp -----------------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "OptionGroupFormat.h"
+
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
+
+using namespace lldb;
+using namespace lldb_private;
+
+OptionGroupFormat::OptionGroupFormat(lldb::Format default_format) :
+    m_format (default_format, default_format)
+{
+}
+
+OptionGroupFormat::~OptionGroupFormat ()
+{
+}
+
+static OptionDefinition 
+g_option_table[] =
+{
+{ LLDB_OPT_SET_1 , false, "format", 'f', required_argument, NULL, 0, eArgTypeFormat , "Specify a format to be used for display."},
+};
+const uint32_t k_num_file_options = sizeof(g_option_table)/sizeof(OptionDefinition);
+
+uint32_t
+OptionGroupFormat::GetNumDefinitions ()
+{
+    return k_num_file_options;
+}
+
+const OptionDefinition *
+OptionGroupFormat::GetDefinitions ()
+{
+    return g_option_table;
+}
+
+Error
+OptionGroupFormat::SetOptionValue (CommandInterpreter &interpreter,
+                                         uint32_t option_idx,
+                                         const char *option_arg)
+{
+    Error error;
+    char short_option = (char) g_option_table[option_idx].short_option;
+
+    switch (short_option)
+    {
+        case 'f':
+            error = m_format.SetValueFromCString (option_arg);
+            break;
+
+        default:
+            error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+            break;
+    }
+
+    return error;
+}
+
+void
+OptionGroupFormat::OptionParsingStarting (CommandInterpreter &interpreter)
+{
+    m_format.Clear();
+}
+