1 //===-- Endian.h ------------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLDB_UTILITY_ENDIAN_H
11 #define LLDB_UTILITY_ENDIAN_H
13 #include "lldb/lldb-enumerations.h"
17 namespace lldb_private {
21 static union EndianTest {
23 uint8_t bytes[sizeof(uint32_t)];
24 } const endianTest = {0x01020304};
26 inline lldb::ByteOrder InlHostByteOrder() {
27 return (lldb::ByteOrder)endianTest.bytes[0];
30 // ByteOrder const InlHostByteOrder = (ByteOrder)endianTest.bytes[0];
34 #endif // liblldb_host_endian_h_