llvm/llvm/include/llvm/BinaryFormat/MsgPack.def

//===- MsgPack.def - MessagePack definitions --------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
///
/// \file
/// Macros for running through MessagePack enumerators.
///
//===----------------------------------------------------------------------===//

#if !(                                                                         \
    defined HANDLE_MP_FIRST_BYTE || defined HANDLE_MP_FIX_BITS ||              \
    defined HANDLE_MP_FIX_BITS_MASK || defined HANDLE_MP_FIX_MAX ||            \
    defined HANDLE_MP_FIX_LEN || defined HANDLE_MP_FIX_MIN)
#error "Missing macro definition of HANDLE_MP*"
#endif

#ifndef HANDLE_MP_FIRST_BYTE
#define HANDLE_MP_FIRST_BYTE
#endif

#ifndef HANDLE_MP_FIX_BITS
#define HANDLE_MP_FIX_BITS
#endif

#ifndef HANDLE_MP_FIX_BITS_MASK
#define HANDLE_MP_FIX_BITS_MASK
#endif

#ifndef HANDLE_MP_FIX_MAX
#define HANDLE_MP_FIX_MAX
#endif

#ifndef HANDLE_MP_FIX_LEN
#define HANDLE_MP_FIX_LEN
#endif

#ifndef HANDLE_MP_FIX_MIN
#define HANDLE_MP_FIX_MIN
#endif

HANDLE_MP_FIRST_BYTE(0xc0, Nil)
HANDLE_MP_FIRST_BYTE(0xc2, False)
HANDLE_MP_FIRST_BYTE(0xc3, True)
HANDLE_MP_FIRST_BYTE(0xc4, Bin8)
HANDLE_MP_FIRST_BYTE(0xc5, Bin16)
HANDLE_MP_FIRST_BYTE(0xc6, Bin32)
HANDLE_MP_FIRST_BYTE(0xc7, Ext8)
HANDLE_MP_FIRST_BYTE(0xc8, Ext16)
HANDLE_MP_FIRST_BYTE(0xc9, Ext32)
HANDLE_MP_FIRST_BYTE(0xca, Float32)
HANDLE_MP_FIRST_BYTE(0xcb, Float64)
HANDLE_MP_FIRST_BYTE(0xcc, UInt8)
HANDLE_MP_FIRST_BYTE(0xcd, UInt16)
HANDLE_MP_FIRST_BYTE(0xce, UInt32)
HANDLE_MP_FIRST_BYTE(0xcf, UInt64)
HANDLE_MP_FIRST_BYTE(0xd0, Int8)
HANDLE_MP_FIRST_BYTE(0xd1, Int16)
HANDLE_MP_FIRST_BYTE(0xd2, Int32)
HANDLE_MP_FIRST_BYTE(0xd3, Int64)
HANDLE_MP_FIRST_BYTE(0xd4, FixExt1)
HANDLE_MP_FIRST_BYTE(0xd5, FixExt2)
HANDLE_MP_FIRST_BYTE(0xd6, FixExt4)
HANDLE_MP_FIRST_BYTE(0xd7, FixExt8)
HANDLE_MP_FIRST_BYTE(0xd8, FixExt16)
HANDLE_MP_FIRST_BYTE(0xd9, Str8)
HANDLE_MP_FIRST_BYTE(0xda, Str16)
HANDLE_MP_FIRST_BYTE(0xdb, Str32)
HANDLE_MP_FIRST_BYTE(0xdc, Array16)
HANDLE_MP_FIRST_BYTE(0xdd, Array32)
HANDLE_MP_FIRST_BYTE(0xde, Map16)
HANDLE_MP_FIRST_BYTE(0xdf, Map32)

HANDLE_MP_FIX_BITS
HANDLE_MP_FIX_BITS
HANDLE_MP_FIX_BITS
HANDLE_MP_FIX_BITS
HANDLE_MP_FIX_BITS

HANDLE_MP_FIX_BITS_MASK
HANDLE_MP_FIX_BITS_MASK
HANDLE_MP_FIX_BITS_MASK
HANDLE_MP_FIX_BITS_MASK
HANDLE_MP_FIX_BITS_MASK

HANDLE_MP_FIX_MAX
HANDLE_MP_FIX_MAX
HANDLE_MP_FIX_MAX
HANDLE_MP_FIX_MAX

HANDLE_MP_FIX_LEN
HANDLE_MP_FIX_LEN
HANDLE_MP_FIX_LEN
HANDLE_MP_FIX_LEN
HANDLE_MP_FIX_LEN

HANDLE_MP_FIX_MIN

#undef HANDLE_MP_FIRST_BYTE
#undef HANDLE_MP_FIX_BITS
#undef HANDLE_MP_FIX_BITS_MASK
#undef HANDLE_MP_FIX_MAX
#undef HANDLE_MP_FIX_LEN
#undef HANDLE_MP_FIX_MIN