Added the ability to get the target triple, byte order and address byte size
from the SBTarget and SBModule interfaces. Also added many python properties
for easier access to many things from many SB objects.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149191 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBModule.cpp b/source/API/SBModule.cpp
index ea893df..0c1307c 100644
--- a/source/API/SBModule.cpp
+++ b/source/API/SBModule.cpp
@@ -475,3 +475,34 @@
     return sb_section;
 }
 
+lldb::ByteOrder
+SBModule::GetByteOrder ()
+{
+    if (m_opaque_sp)
+        return m_opaque_sp->GetArchitecture().GetByteOrder();
+    return eByteOrderInvalid;
+}
+
+const char *
+SBModule::GetTriple ()
+{
+    if (m_opaque_sp)
+    {
+        std::string triple (m_opaque_sp->GetArchitecture().GetTriple().str());
+        // Unique the string so we don't run into ownership issues since
+        // the const strings put the string into the string pool once and
+        // the strings never comes out
+        ConstString const_triple (triple.c_str());
+        return const_triple.GetCString();
+    }
+    return NULL;
+}
+
+uint32_t
+SBModule::GetAddressByteSize()
+{
+    if (m_opaque_sp)
+        return m_opaque_sp->GetArchitecture().GetAddressByteSize();
+    return sizeof(void*);
+}
+