|
|
|||
File indexing completed on 2026-05-10 08:42:57
0001 //===-- Endian.h ------------------------------------------------*- C++ -*-===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===----------------------------------------------------------------------===// 0008 0009 #ifndef LLDB_UTILITY_ENDIAN_H 0010 #define LLDB_UTILITY_ENDIAN_H 0011 0012 #include "lldb/lldb-enumerations.h" 0013 0014 #include <cstdint> 0015 0016 namespace lldb_private { 0017 0018 namespace endian { 0019 0020 static union EndianTest { 0021 uint32_t num; 0022 uint8_t bytes[sizeof(uint32_t)]; 0023 } const endianTest = {0x01020304}; 0024 0025 inline lldb::ByteOrder InlHostByteOrder() { 0026 return static_cast<lldb::ByteOrder>(endianTest.bytes[0]); 0027 } 0028 0029 // ByteOrder const InlHostByteOrder = (ByteOrder)endianTest.bytes[0]; 0030 } 0031 } 0032 0033 #endif // LLDB_UTILITY_ENDIAN_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|