Endian patch from Kirk Beitz that allows better cross platform building.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124643 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Host/common/Host.cpp b/source/Host/common/Host.cpp
index ce82694..9bd8081 100644
--- a/source/Host/common/Host.cpp
+++ b/source/Host/common/Host.cpp
@@ -14,6 +14,7 @@
#include "lldb/Core/FileSpec.h"
#include "lldb/Core/Log.h"
#include "lldb/Core/StreamString.h"
+#include "lldb/Host/Endian.h"
#include "lldb/Host/Mutex.h"
#include <dlfcn.h>
@@ -214,26 +215,6 @@
return ::getpagesize();
}
-//------------------------------------------------------------------
-// Returns true if the host system is Big Endian.
-//------------------------------------------------------------------
-ByteOrder
-Host::GetByteOrder ()
-{
- union EndianTest
- {
- uint32_t num;
- uint8_t bytes[sizeof(uint32_t)];
- } endian = { (uint16_t)0x11223344 };
- switch (endian.bytes[0])
- {
- case 0x11: return eByteOrderLittle;
- case 0x44: return eByteOrderBig;
- case 0x33: return eByteOrderPDP;
- }
- return eByteOrderInvalid;
-}
-
const ArchSpec &
Host::GetArchitecture ()
{