Go to the documentation of this file.
9#ifndef __CLANG_LLVM_LIBC_WRAPPERS_CTYPE_H__
10#define __CLANG_LLVM_LIBC_WRAPPERS_CTYPE_H__
12#if !defined(_OPENMP) && !defined(__HIP__) && !defined(__CUDA__)
13#error "This file is for GPU offloading compilation only"
18#if (defined(__NVPTX__) || defined(__AMDGPU__)) && defined(__GLIBC__)
19#pragma push_macro("__USE_EXTERN_INLINES")
20#undef __USE_EXTERN_INLINES
23#include_next <ctype.h>
25#if (defined(__NVPTX__) || defined(__AMDGPU__)) && defined(__GLIBC__)
26#pragma pop_macro("__USE_EXTERN_INLINES")
29#if __has_include(<llvm-libc-decls/ctype.h>)
31#if defined(__HIP__) || defined(__CUDA__)
32#define __LIBC_ATTRS __attribute__((device))
38#pragma push_macro("isalnum")
39#pragma push_macro("isalpha")
40#pragma push_macro("isascii")
41#pragma push_macro("isblank")
42#pragma push_macro("iscntrl")
43#pragma push_macro("isdigit")
44#pragma push_macro("isgraph")
45#pragma push_macro("islower")
46#pragma push_macro("isprint")
47#pragma push_macro("ispunct")
48#pragma push_macro("isspace")
49#pragma push_macro("isupper")
50#pragma push_macro("isxdigit")
51#pragma push_macro("toascii")
52#pragma push_macro("tolower")
53#pragma push_macro("toupper")
72#pragma omp begin declare target
74#include <llvm-libc-decls/ctype.h>
76#pragma omp end declare target
79#if !defined(__NVPTX__) && !defined(__AMDGPU__)
80#pragma pop_macro("isalnum")
81#pragma pop_macro("isalpha")
82#pragma pop_macro("isascii")
83#pragma pop_macro("isblank")
84#pragma pop_macro("iscntrl")
85#pragma pop_macro("isdigit")
86#pragma pop_macro("isgraph")
87#pragma pop_macro("islower")
88#pragma pop_macro("isprint")
89#pragma pop_macro("ispunct")
90#pragma pop_macro("isspace")
91#pragma pop_macro("isupper")
92#pragma pop_macro("isxdigit")
93#pragma pop_macro("toascii")
94#pragma pop_macro("tolower")
95#pragma pop_macro("toupper")