The first part of a fix for being able to select an architecture slice from
a file when the target has a triple with an unknown vendor and/or OS and the
slice of the file itself has a valid vendor and/or OS.

The Module now adopts the ObjectFile's architecture after a valid architecture
has been loaded to make sure the module matches the object file.

llvm-svn: 140236
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index dc0c55c..e2c921e 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -637,6 +637,13 @@
         Timer scoped_timer(__PRETTY_FUNCTION__,
                            "Module::GetObjectFile () module = %s", GetFileSpec().GetFilename().AsCString(""));
         m_objfile_sp = ObjectFile::FindPlugin(this, &m_file, m_object_offset, m_file.GetByteSize());
+        if (m_objfile_sp)
+        {
+			// Once we get the object file, update our module with the object file's 
+			// architecture since it might differ in vendor/os if some parts were
+			// unknown.
+            m_objfile_sp->GetArchitecture (m_arch);
+        }
     }
     return m_objfile_sp.get();
 }