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")
54#pragma push_macro("isalnum_l")
55#pragma push_macro("isalpha_l")
56#pragma push_macro("isascii_l")
57#pragma push_macro("isblank_l")
58#pragma push_macro("iscntrl_l")
59#pragma push_macro("isdigit_l")
60#pragma push_macro("isgraph_l")
61#pragma push_macro("islower_l")
62#pragma push_macro("isprint_l")
63#pragma push_macro("ispunct_l")
64#pragma push_macro("isspace_l")
65#pragma push_macro("isupper_l")
66#pragma push_macro("isxdigit_l")
97#pragma omp begin declare target
99#include <llvm-libc-decls/ctype.h>
101#pragma omp end declare target
104#if !defined(__NVPTX__) && !defined(__AMDGPU__)
105#pragma pop_macro("isalnum")
106#pragma pop_macro("isalpha")
107#pragma pop_macro("isascii")
108#pragma pop_macro("isblank")
109#pragma pop_macro("iscntrl")
110#pragma pop_macro("isdigit")
111#pragma pop_macro("isgraph")
112#pragma pop_macro("islower")
113#pragma pop_macro("isprint")
114#pragma pop_macro("ispunct")
115#pragma pop_macro("isspace")
116#pragma pop_macro("isupper")
117#pragma pop_macro("isxdigit")
118#pragma pop_macro("toascii")
119#pragma pop_macro("tolower")
120#pragma pop_macro("toupper")
121#pragma pop_macro("isalnum_l")
122#pragma pop_macro("isalpha_l")
123#pragma pop_macro("isascii_l")
124#pragma pop_macro("isblank_l")
125#pragma pop_macro("iscntrl_l")
126#pragma pop_macro("isdigit_l")
127#pragma pop_macro("isgraph_l")
128#pragma pop_macro("islower_l")
129#pragma pop_macro("isprint_l")
130#pragma pop_macro("ispunct_l")
131#pragma pop_macro("isspace_l")
132#pragma pop_macro("isupper_l")
133#pragma pop_macro("isxdigit_l")