| 1 |
//===--- cstdint - Stub header for tests ------------------------*- C++ -*-===// |
| 2 |
// |
| 3 |
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 |
// See https://llvm.org/LICENSE.txt for license information. |
| 5 |
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 |
// |
| 7 |
//===----------------------------------------------------------------------===// |
| 8 |
|
| 9 |
#ifndef _CSTDINT_ |
| 10 |
#define _CSTDINT_ |
| 11 |
|
| 12 |
typedef __INTMAX_TYPE__ intmax_t; |
| 13 |
typedef __UINTMAX_TYPE__ uintmax_t; |
| 14 |
|
| 15 |
namespace std { |
| 16 |
using ::intmax_t; |
| 17 |
using ::uintmax_t; |
| 18 |
} |
| 19 |
|
| 20 |
#define DECLARE_INTTYPE(N) \ |
| 21 |
typedef __INT ## N ## _TYPE__ int ## N ## _t; \ |
| 22 |
typedef int ## N ## _t int_least ## N ## _t; \ |
| 23 |
typedef int ## N ## _t int_fast ## N ## _t; \ |
| 24 |
typedef __UINT ## N ## _TYPE__ uint ## N ## _t; \ |
| 25 |
typedef uint ## N ## _t uint_least ## N ## _t; \ |
| 26 |
typedef uint ## N ## _t uint_fast ## N ## _t; \ |
| 27 |
namespace std { \ |
| 28 |
using ::int ## N ## _t; \ |
| 29 |
using ::int_least ## N ## _t; \ |
| 30 |
using ::int_fast ## N ## _t; \ |
| 31 |
using ::uint ## N ## _t; \ |
| 32 |
using ::uint_least ## N ## _t; \ |
| 33 |
using ::uint_fast ## N ## _t; \ |
| 34 |
} // std |
| 35 |
|
| 36 |
// For reasons unknown, these aren't coming in from <stdint.h> |
| 37 |
DECLARE_INTTYPE(8) |
| 38 |
DECLARE_INTTYPE(64) |
| 39 |
|
| 40 |
#endif // _CSTDINT__ |