Made lldb_private::ArchSpec contain much more than just an architecture. It
now, in addition to cpu type/subtype and architecture flavor, contains:
- byte order (big endian, little endian)
- address size in bytes
- llvm::Triple for true target triple support and for more powerful plug-in
  selection.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125602 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/Target.cpp b/source/Target/Target.cpp
index 7a39958..b76f9f6 100644
--- a/source/Target/Target.cpp
+++ b/source/Target/Target.cpp
@@ -45,7 +45,6 @@
     m_breakpoint_list (false),
     m_internal_breakpoint_list (true),
     m_process_sp(),
-    m_triple(),
     m_search_filter_sp(),
     m_image_search_paths (ImageSearchPathsChanged, this),
     m_scratch_ast_context_ap (NULL),
@@ -447,10 +446,9 @@
         }
         
         // Now see if we know the target triple, and if so, create our scratch AST context:
-        ConstString target_triple;
-        if (GetTargetTriple(target_triple))
+        if (m_arch_spec.IsValid())
         {
-            m_scratch_ast_context_ap.reset (new ClangASTContext(target_triple.GetCString()));
+            m_scratch_ast_context_ap.reset (new ClangASTContext(m_arch_spec.GetTriple().str().c_str()));
         }
     }
 
@@ -458,18 +456,6 @@
 }
 
 
-ModuleList&
-Target::GetImages ()
-{
-    return m_images;
-}
-
-ArchSpec
-Target::GetArchitecture () const
-{
-    return m_arch_spec;
-}
-
 bool
 Target::SetArchitecture (const ArchSpec &arch_spec)
 {
@@ -492,7 +478,6 @@
         ModuleSP executable_sp = GetExecutableModule ();
         m_images.Clear();
         m_scratch_ast_context_ap.reset();
-        m_triple.Clear();
         // Need to do something about unsetting breakpoints.
         
         if (executable_sp)
@@ -524,31 +509,6 @@
     }
 }
 
-bool
-Target::GetTargetTriple(ConstString &triple)
-{
-    triple.Clear();
-
-    if (m_triple)
-    {
-        triple = m_triple;
-    }
-    else
-    {
-        Module *exe_module = GetExecutableModule().get();
-        if (exe_module)
-        {
-            ObjectFile *objfile = exe_module->GetObjectFile();
-            if (objfile)
-            {
-                objfile->GetTargetTriple(m_triple);
-                triple = m_triple;
-            }
-        }
-    }
-    return !triple.IsEmpty();
-}
-
 void
 Target::ModuleAdded (ModuleSP &module_sp)
 {