7#define SLANG_DISABLE_EXCEPTIONS 1
9#ifndef SLANG_PRELUDE_ASSERT
10#ifdef SLANG_PRELUDE_ENABLE_ASSERT
11extern "C" void assertFailure(
const char* msg);
12#define SLANG_PRELUDE_EXPECT(VALUE, MSG) \
17 assertFailure("assertion failed: '" MSG "'")
18#define SLANG_PRELUDE_ASSERT(VALUE) SLANG_PRELUDE_EXPECT(VALUE, #VALUE)
20#define SLANG_PRELUDE_EXPECT(VALUE, MSG)
21#define SLANG_PRELUDE_ASSERT(x)
35#if defined(__need_NULL)
38#if !defined(__MINGW32__) && !defined(_MSC_VER)
44#define NULL ((void*)0)
47#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
50typedef decltype(
nullptr) nullptr_t;
52using ::std::nullptr_t;
66#ifndef __int8_t_defined
67typedef __INT64_TYPE__ int64_t;
69typedef __UINT64_TYPE__ uint64_t;
70#define __int_least64_t int64_t
71#define __uint_least64_t uint64_t
75typedef __int_least64_t int_least64_t;
76typedef __uint_least64_t uint_least64_t;
77typedef __int_least64_t int_fast64_t;
78typedef __uint_least64_t uint_fast64_t;
83#ifndef __int8_t_defined
84typedef __INT32_TYPE__ int32_t;
87#ifndef __uint32_t_defined
88#define __uint32_t_defined
89typedef __UINT32_TYPE__ uint32_t;
92#define __int_least32_t int32_t
93#define __uint_least32_t uint32_t
97typedef __int_least32_t int_least32_t;
98typedef __uint_least32_t uint_least32_t;
99typedef __int_least32_t int_fast32_t;
100typedef __uint_least32_t uint_fast32_t;
104#ifndef __int8_t_defined
105typedef __INT16_TYPE__ int16_t;
107typedef __UINT16_TYPE__ uint16_t;
108#define __int_least16_t int16_t
109#define __uint_least16_t uint16_t
112#ifdef __int_least16_t
113typedef __int_least16_t int_least16_t;
114typedef __uint_least16_t uint_least16_t;
115typedef __int_least16_t int_fast16_t;
116typedef __uint_least16_t uint_fast16_t;
120#ifndef __int8_t_defined
121typedef __INT8_TYPE__ int8_t;
123typedef __UINT8_TYPE__ uint8_t;
124#define __int_least8_t int8_t
125#define __uint_least8_t uint8_t
129typedef __int_least8_t int_least8_t;
130typedef __uint_least8_t uint_least8_t;
131typedef __int_least8_t int_fast8_t;
132typedef __uint_least8_t uint_fast8_t;
136#ifndef __int8_t_defined
137#define __int8_t_defined
142#define __stdint_join3(a, b, c) a##b##c
145#ifndef __intptr_t_defined
147#define __intptr_t_defined
179#define __int_c_join(a, b) a##b
180#define __int_c(v, suffix) __int_c_join(v, suffix)
181#define __uint_c(v, suffix) __int_c_join(v##U, suffix)
184#ifdef __INT64_C_SUFFIX__
185#define __int64_c_suffix __INT64_C_SUFFIX__
187#undef __int64_c_suffix
191#ifdef __int_least64_t
192#ifdef __int64_c_suffix
193#define INT64_C(v) __int_c(v, __int64_c_suffix)
194#define UINT64_C(v) __uint_c(v, __int64_c_suffix)
197#define UINT64_C(v) v##U
203#ifdef __INT32_C_SUFFIX__
204#define __int32_c_suffix __INT32_C_SUFFIX__
206#undef __int32_c_suffix
210#ifdef __int_least32_t
211#ifdef __int32_c_suffix
212#define INT32_C(v) __int_c(v, __int32_c_suffix)
213#define UINT32_C(v) __uint_c(v, __int32_c_suffix)
216#define UINT32_C(v) v##U
221#ifdef __INT16_C_SUFFIX__
222#define __int16_c_suffix __INT16_C_SUFFIX__
224#undef __int16_c_suffix
228#ifdef __int_least16_t
229#ifdef __int16_c_suffix
230#define INT16_C(v) __int_c(v, __int16_c_suffix)
231#define UINT16_C(v) __uint_c(v, __int16_c_suffix)
234#define UINT16_C(v) v##U
240#ifdef __INT8_C_SUFFIX__
241#define __int8_c_suffix __INT8_C_SUFFIX__
243#undef __int8_c_suffix
248#ifdef __int8_c_suffix
249#define INT8_C(v) __int_c(v, __int8_c_suffix)
250#define UINT8_C(v) __uint_c(v, __int8_c_suffix)
253#define UINT8_C(v) v##U
277#define INT64_MAX INT64_C(9223372036854775807)
278#define INT64_MIN (-INT64_C(9223372036854775807) - 1)
279#define UINT64_MAX UINT64_C(18446744073709551615)
280#define __INT_LEAST64_MIN INT64_MIN
281#define __INT_LEAST64_MAX INT64_MAX
282#define __UINT_LEAST64_MAX UINT64_MAX
285#ifdef __INT_LEAST64_MIN
286#define INT_LEAST64_MIN __INT_LEAST64_MIN
287#define INT_LEAST64_MAX __INT_LEAST64_MAX
288#define UINT_LEAST64_MAX __UINT_LEAST64_MAX
289#define INT_FAST64_MIN __INT_LEAST64_MIN
290#define INT_FAST64_MAX __INT_LEAST64_MAX
291#define UINT_FAST64_MAX __UINT_LEAST64_MAX
295#define INT32_MAX INT32_C(2147483647)
296#define INT32_MIN (-INT32_C(2147483647) - 1)
297#define UINT32_MAX UINT32_C(4294967295)
298#define __INT_LEAST32_MIN INT32_MIN
299#define __INT_LEAST32_MAX INT32_MAX
300#define __UINT_LEAST32_MAX UINT32_MAX
303#ifdef __INT_LEAST32_MIN
304#define INT_LEAST32_MIN __INT_LEAST32_MIN
305#define INT_LEAST32_MAX __INT_LEAST32_MAX
306#define UINT_LEAST32_MAX __UINT_LEAST32_MAX
307#define INT_FAST32_MIN __INT_LEAST32_MIN
308#define INT_FAST32_MAX __INT_LEAST32_MAX
309#define UINT_FAST32_MAX __UINT_LEAST32_MAX
313#define INT16_MAX INT16_C(32767)
314#define INT16_MIN (-INT16_C(32767) - 1)
315#define UINT16_MAX UINT16_C(65535)
316#define __INT_LEAST16_MIN INT16_MIN
317#define __INT_LEAST16_MAX INT16_MAX
318#define __UINT_LEAST16_MAX UINT16_MAX
321#ifdef __INT_LEAST16_MIN
322#define INT_LEAST16_MIN __INT_LEAST16_MIN
323#define INT_LEAST16_MAX __INT_LEAST16_MAX
324#define UINT_LEAST16_MAX __UINT_LEAST16_MAX
325#define INT_FAST16_MIN __INT_LEAST16_MIN
326#define INT_FAST16_MAX __INT_LEAST16_MAX
327#define UINT_FAST16_MAX __UINT_LEAST16_MAX
332#define INT8_MAX INT8_C(127)
333#define INT8_MIN (-INT8_C(127) - 1)
334#define UINT8_MAX UINT8_C(255)
335#define __INT_LEAST8_MIN INT8_MIN
336#define __INT_LEAST8_MAX INT8_MAX
337#define __UINT_LEAST8_MAX UINT8_MAX
340#ifdef __INT_LEAST8_MIN
341#define INT_LEAST8_MIN __INT_LEAST8_MIN
342#define INT_LEAST8_MAX __INT_LEAST8_MAX
343#define UINT_LEAST8_MAX __UINT_LEAST8_MAX
344#define INT_FAST8_MIN __INT_LEAST8_MIN
345#define INT_FAST8_MAX __INT_LEAST8_MAX
346#define UINT_FAST8_MAX __UINT_LEAST8_MAX
350#define __INTN_MIN(n) __stdint_join3(INT, n, _MIN)
351#define __INTN_MAX(n) __stdint_join3(INT, n, _MAX)
352#define __UINTN_MAX(n) __stdint_join3(UINT, n, _MAX)
353#define __INTN_C(n, v) __stdint_join3(INT, n, _C(v))
354#define __UINTN_C(n, v) __stdint_join3(UINT, n, _C(v))
359#define INTPTR_MIN (-__INTPTR_MAX__ - 1)
360#define INTPTR_MAX __INTPTR_MAX__
361#define UINTPTR_MAX __UINTPTR_MAX__
362#define PTRDIFF_MIN (-__PTRDIFF_MAX__ - 1)
363#define PTRDIFF_MAX __PTRDIFF_MAX__
364#define SIZE_MAX __SIZE_MAX__
368#if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1
369#define RSIZE_MAX (SIZE_MAX >> 1)
373#define INTMAX_MIN (-__INTMAX_MAX__ - 1)
374#define INTMAX_MAX __INTMAX_MAX__
375#define UINTMAX_MAX __UINTMAX_MAX__
378#define SIG_ATOMIC_MIN __INTN_MIN(__SIG_ATOMIC_WIDTH__)
379#define SIG_ATOMIC_MAX __INTN_MAX(__SIG_ATOMIC_WIDTH__)
380#ifdef __WINT_UNSIGNED__
381#define WINT_MIN __UINTN_C(__WINT_WIDTH__, 0)
382#define WINT_MAX __UINTN_MAX(__WINT_WIDTH__)
384#define WINT_MIN __INTN_MIN(__WINT_WIDTH__)
385#define WINT_MAX __INTN_MAX(__WINT_WIDTH__)
389#define WCHAR_MAX __WCHAR_MAX__
392#if __WCHAR_MAX__ == __INTN_MAX(__WCHAR_WIDTH__)
393#define WCHAR_MIN __INTN_MIN(__WCHAR_WIDTH__)
395#define WCHAR_MIN __UINTN_C(__WCHAR_WIDTH__, 0)
400#define INTMAX_C(v) __int_c(v, __INTMAX_C_SUFFIX__)
401#define UINTMAX_C(v) __int_c(v, __UINTMAX_C_SUFFIX__)
__INTPTR_TYPE__ intptr_t
Definition slang-llvm.h:146
__UINTPTR_TYPE__ uintptr_t
Definition slang-llvm.h:153
__UINTMAX_TYPE__ uintmax_t
Definition slang-llvm.h:160
__PTRDIFF_TYPE__ ptrdiff_t
Definition slang-llvm.h:29
__SIZE_TYPE__ size_t
Definition slang-llvm.h:30
__SIZE_TYPE__ rsize_t
Definition slang-llvm.h:31
__INTMAX_TYPE__ intmax_t
Definition slang-llvm.h:159