Added auto completion for architecture names and for platforms.

Modified the OptionGroupOptions to be able to specify only some of the options
that should be appended by using the usage_mask in the group defintions and
also provided a way to remap them to a new usage mask after the copy. This 
allows options to be re-used and also targetted for specific option groups.

Modfied the CommandArgumentType to have a new eArgTypePlatform enumeration.
Taught the option parser to be able to automatically use the appropriate
auto completion for a given options if nothing is explicitly specified
in the option definition. So you don't have to specify it in the option
definition tables.

Renamed the default host platform name to "host", and the default platform
hostname to be "localhost".

Modified the "file" and "platform select" commands to make sure all options
and args are good prior to creating a new platform. Also defer the computation
of the architecture in the file command until all options are parsed and the
platform has either not been specified or reset to a new value to avoid
computing the arch more than once.

Switch the PluginManager code over to using llvm::StringRef for string
comparisons and got rid of all the AccessorXXX functions in lieu of the newer
mutex + collection singleton accessors.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129483 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectFile.h b/source/Commands/CommandObjectFile.h
index 1af8896..f3ef2d9 100644
--- a/source/Commands/CommandObjectFile.h
+++ b/source/Commands/CommandObjectFile.h
@@ -26,37 +26,35 @@
 // CommandObjectFile
 //-------------------------------------------------------------------------
 
-    class FileOptionGroup : public OptionGroup
-    {
-    public:
-        
-        FileOptionGroup ();
-        
-        virtual
-        ~FileOptionGroup ();
+class FileOptionGroup : public OptionGroup
+{
+public:
+    
+    FileOptionGroup ();
+    
+    virtual
+    ~FileOptionGroup ();
 
-        
-        virtual uint32_t
-        GetNumDefinitions ();
-        
-        virtual const OptionDefinition*
-        GetDefinitions ();
-        
-        virtual Error
-        SetOptionValue (CommandInterpreter &interpreter,
-                        uint32_t option_idx,
-                        const char *option_value);
-        
-        virtual void
-        OptionParsingStarting (CommandInterpreter &interpreter);
-        
-        virtual Error
-        OptionParsingFinished (CommandInterpreter &interpreter);
-        
-        ArchSpec m_arch;
-        lldb::PlatformSP m_arch_platform_sp; // The platform that was used to resolve m_arch
-        std::string m_arch_str; // Save the arch triple in case a platform is specified after the architecture
-    };
+    
+    virtual uint32_t
+    GetNumDefinitions ();
+    
+    virtual const OptionDefinition*
+    GetDefinitions ();
+    
+    virtual Error
+    SetOptionValue (CommandInterpreter &interpreter,
+                    uint32_t option_idx,
+                    const char *option_value);
+    
+    virtual void
+    OptionParsingStarting (CommandInterpreter &interpreter);
+    
+    bool
+    GetArchitecture (Platform *platform, ArchSpec &arch);
+
+    std::string m_arch_str; // Save the arch triple in case a platform is specified after the architecture
+};
 
 class CommandObjectFile : public CommandObject
 {