@cpp-linter/clang-tidy-linux-arm64 17.0.6 → 19.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/README.md +2 -2
  2. package/bin/clang-tidy +2 -2
  3. package/lib/clang/{17 → 19}/include/__clang_cuda_device_functions.h +2 -2
  4. package/lib/clang/{17 → 19}/include/__clang_cuda_intrinsics.h +1 -3
  5. package/lib/clang/{17 → 19}/include/__clang_cuda_libdevice_declares.h +2 -2
  6. package/lib/clang/{17 → 19}/include/__clang_cuda_math.h +2 -2
  7. package/lib/clang/{17 → 19}/include/__clang_cuda_runtime_wrapper.h +2 -2
  8. package/lib/clang/{17 → 19}/include/__clang_hip_math.h +192 -171
  9. package/lib/clang/{17 → 19}/include/__clang_hip_runtime_wrapper.h +34 -26
  10. package/lib/clang/19/include/__stdarg___gnuc_va_list.h +13 -0
  11. package/lib/clang/19/include/__stdarg___va_copy.h +12 -0
  12. package/lib/clang/19/include/__stdarg_header_macro.h +12 -0
  13. package/lib/clang/19/include/__stdarg_va_arg.h +22 -0
  14. package/lib/clang/19/include/__stdarg_va_copy.h +12 -0
  15. package/lib/clang/19/include/__stdarg_va_list.h +13 -0
  16. package/lib/clang/19/include/__stddef_header_macro.h +12 -0
  17. package/lib/clang/{17 → 19}/include/__stddef_max_align_t.h +1 -1
  18. package/lib/clang/19/include/__stddef_null.h +29 -0
  19. package/lib/clang/19/include/__stddef_nullptr_t.h +29 -0
  20. package/lib/clang/19/include/__stddef_offsetof.h +17 -0
  21. package/lib/clang/19/include/__stddef_ptrdiff_t.h +20 -0
  22. package/lib/clang/19/include/__stddef_rsize_t.h +20 -0
  23. package/lib/clang/19/include/__stddef_size_t.h +20 -0
  24. package/lib/clang/19/include/__stddef_unreachable.h +21 -0
  25. package/lib/clang/19/include/__stddef_wchar_t.h +28 -0
  26. package/lib/clang/19/include/__stddef_wint_t.h +15 -0
  27. package/lib/clang/{17/include/adxintrin.h → 19/include/adcintrin.h} +27 -94
  28. package/lib/clang/19/include/adxintrin.h +102 -0
  29. package/lib/clang/{17 → 19}/include/altivec.h +31 -12
  30. package/lib/clang/{17 → 19}/include/ammintrin.h +4 -4
  31. package/lib/clang/{17 → 19}/include/arm_acle.h +138 -32
  32. package/lib/clang/{17 → 19}/include/arm_fp16.h +1 -1
  33. package/lib/clang/{17 → 19}/include/arm_neon.h +43361 -43608
  34. package/lib/clang/19/include/arm_sme.h +2819 -0
  35. package/lib/clang/{17 → 19}/include/arm_sve.h +30202 -23615
  36. package/lib/clang/19/include/arm_vector_types.h +345 -0
  37. package/lib/clang/{17 → 19}/include/avx2intrin.h +24 -3
  38. package/lib/clang/{17 → 19}/include/avx512bf16intrin.h +3 -2
  39. package/lib/clang/{17 → 19}/include/avx512bitalgintrin.h +4 -1
  40. package/lib/clang/{17 → 19}/include/avx512bwintrin.h +28 -38
  41. package/lib/clang/{17 → 19}/include/avx512cdintrin.h +3 -1
  42. package/lib/clang/{17 → 19}/include/avx512dqintrin.h +4 -2
  43. package/lib/clang/{17 → 19}/include/avx512fintrin.h +7 -3
  44. package/lib/clang/{17 → 19}/include/avx512fp16intrin.h +44 -42
  45. package/lib/clang/{17 → 19}/include/avx512ifmaintrin.h +3 -1
  46. package/lib/clang/{17 → 19}/include/avx512ifmavlintrin.h +8 -2
  47. package/lib/clang/{17 → 19}/include/avx512vbmi2intrin.h +1 -1
  48. package/lib/clang/{17 → 19}/include/avx512vbmiintrin.h +3 -2
  49. package/lib/clang/{17 → 19}/include/avx512vbmivlintrin.h +8 -3
  50. package/lib/clang/{17 → 19}/include/avx512vlbf16intrin.h +8 -6
  51. package/lib/clang/{17 → 19}/include/avx512vlbitalgintrin.h +8 -2
  52. package/lib/clang/{17 → 19}/include/avx512vlbwintrin.h +8 -2
  53. package/lib/clang/{17 → 19}/include/avx512vlcdintrin.h +8 -3
  54. package/lib/clang/{17 → 19}/include/avx512vldqintrin.h +8 -2
  55. package/lib/clang/{17 → 19}/include/avx512vlfp16intrin.h +2 -2
  56. package/lib/clang/{17 → 19}/include/avx512vlintrin.h +8 -2
  57. package/lib/clang/{17 → 19}/include/avx512vlvbmi2intrin.h +8 -2
  58. package/lib/clang/{17 → 19}/include/avx512vlvnniintrin.h +8 -2
  59. package/lib/clang/{17 → 19}/include/avx512vlvp2intersectintrin.h +6 -4
  60. package/lib/clang/{17 → 19}/include/avx512vnniintrin.h +3 -2
  61. package/lib/clang/{17 → 19}/include/avx512vp2intersectintrin.h +3 -2
  62. package/lib/clang/{17 → 19}/include/avx512vpopcntdqintrin.h +3 -1
  63. package/lib/clang/{17 → 19}/include/avx512vpopcntdqvlintrin.h +6 -2
  64. package/lib/clang/{17 → 19}/include/avxintrin.h +67 -49
  65. package/lib/clang/{17 → 19}/include/bmiintrin.h +233 -50
  66. package/lib/clang/{17 → 19}/include/builtins.h +3 -0
  67. package/lib/clang/{17 → 19}/include/cpuid.h +23 -3
  68. package/lib/clang/{17 → 19}/include/cuda_wrappers/algorithm +1 -1
  69. package/lib/clang/{17 → 19}/include/emmintrin.h +311 -180
  70. package/lib/clang/{17 → 19}/include/float.h +28 -0
  71. package/lib/clang/{17 → 19}/include/fmaintrin.h +32 -16
  72. package/lib/clang/{17 → 19}/include/gfniintrin.h +23 -6
  73. package/lib/clang/{17 → 19}/include/hlsl/hlsl_basic_types.h +10 -3
  74. package/lib/clang/19/include/hlsl/hlsl_intrinsics.h +1697 -0
  75. package/lib/clang/19/include/ia32intrin.h +863 -0
  76. package/lib/clang/{17 → 19}/include/immintrin.h +149 -160
  77. package/lib/clang/{17 → 19}/include/intrin.h +61 -221
  78. package/lib/clang/19/include/intrin0.h +247 -0
  79. package/lib/clang/{17 → 19}/include/inttypes.h +4 -0
  80. package/lib/clang/{17 → 19}/include/iso646.h +4 -0
  81. package/lib/clang/{17 → 19}/include/keylockerintrin.h +5 -8
  82. package/lib/clang/{17 → 19}/include/larchintrin.h +13 -1
  83. package/lib/clang/19/include/lasxintrin.h +3884 -0
  84. package/lib/clang/{17 → 19}/include/limits.h +7 -4
  85. package/lib/clang/{17/include/llvm_libc_wrappers/stdio.h → 19/include/llvm_libc_wrappers/assert.h} +7 -7
  86. package/lib/clang/{17 → 19}/include/llvm_libc_wrappers/ctype.h +17 -0
  87. package/lib/clang/19/include/llvm_libc_wrappers/stdio.h +80 -0
  88. package/lib/clang/{17 → 19}/include/llvm_libc_wrappers/stdlib.h +4 -1
  89. package/lib/clang/19/include/llvm_libc_wrappers/string.h +96 -0
  90. package/lib/clang/{17/include/llvm_libc_wrappers/string.h → 19/include/llvm_libc_wrappers/time.h} +9 -12
  91. package/lib/clang/19/include/lsxintrin.h +3750 -0
  92. package/lib/clang/19/include/mm3dnow.h +22 -0
  93. package/lib/clang/{17 → 19}/include/mmintrin.h +83 -89
  94. package/lib/clang/19/include/module.modulemap +330 -0
  95. package/lib/clang/{17 → 19}/include/opencl-c-base.h +9 -0
  96. package/lib/clang/{17 → 19}/include/opencl-c.h +15 -0
  97. package/lib/clang/{17 → 19}/include/openmp_wrappers/cmath +1 -1
  98. package/lib/clang/{17 → 19}/include/pmmintrin.h +3 -2
  99. package/lib/clang/19/include/ppc_wrappers/nmmintrin.h +26 -0
  100. package/lib/clang/{17 → 19}/include/ppc_wrappers/smmintrin.h +35 -15
  101. package/lib/clang/{17 → 19}/include/prfchwintrin.h +10 -8
  102. package/lib/clang/19/include/ptrauth.h +330 -0
  103. package/lib/clang/19/include/riscv_bitmanip.h +195 -0
  104. package/lib/clang/19/include/riscv_crypto.h +170 -0
  105. package/lib/clang/{17 → 19}/include/riscv_ntlh.h +3 -5
  106. package/lib/clang/{17 → 19}/include/riscv_vector.h +31 -4
  107. package/lib/clang/19/include/sifive_vector.h +118 -0
  108. package/lib/clang/{17 → 19}/include/smmintrin.h +15 -15
  109. package/lib/clang/{17 → 19}/include/stdalign.h +6 -3
  110. package/lib/clang/19/include/stdarg.h +75 -0
  111. package/lib/clang/{17 → 19}/include/stdatomic.h +14 -6
  112. package/lib/clang/{17 → 19}/include/stdbool.h +5 -0
  113. package/lib/clang/19/include/stdckdint.h +42 -0
  114. package/lib/clang/19/include/stddef.h +139 -0
  115. package/lib/clang/{17 → 19}/include/stdint.h +24 -48
  116. package/lib/clang/{17 → 19}/include/stdnoreturn.h +8 -2
  117. package/lib/clang/{17 → 19}/include/tmmintrin.h +27 -18
  118. package/lib/clang/19/include/usermsrintrin.h +51 -0
  119. package/lib/clang/{17 → 19}/include/vaesintrin.h +4 -2
  120. package/lib/clang/{17 → 19}/include/varargs.h +5 -1
  121. package/lib/clang/{17 → 19}/include/vecintrin.h +217 -199
  122. package/lib/clang/{17 → 19}/include/x86gprintrin.h +10 -12
  123. package/lib/clang/19/include/x86intrin.h +53 -0
  124. package/lib/clang/{17 → 19}/include/xmmintrin.h +294 -104
  125. package/lib/clang/19/include/yvals_core.h +25 -0
  126. package/lib/clang/19/include/zos_wrappers/builtins.h +18 -0
  127. package/package.json +6 -6
  128. package/lib/clang/17/include/arm_sme_draft_spec_subject_to_change.h +0 -642
  129. package/lib/clang/17/include/avx512erintrin.h +0 -271
  130. package/lib/clang/17/include/avx512pfintrin.h +0 -97
  131. package/lib/clang/17/include/hlsl/hlsl_intrinsics.h +0 -480
  132. package/lib/clang/17/include/ia32intrin.h +0 -441
  133. package/lib/clang/17/include/mm3dnow.h +0 -157
  134. package/lib/clang/17/include/module.modulemap +0 -164
  135. package/lib/clang/17/include/sifive_vector.h +0 -16
  136. package/lib/clang/17/include/stdarg.h +0 -51
  137. package/lib/clang/17/include/stddef.h +0 -133
  138. package/lib/clang/17/include/x86intrin.h +0 -67
  139. /package/lib/clang/{17 → 19}/include/__clang_cuda_builtin_vars.h +0 -0
  140. /package/lib/clang/{17 → 19}/include/__clang_cuda_cmath.h +0 -0
  141. /package/lib/clang/{17 → 19}/include/__clang_cuda_complex_builtins.h +0 -0
  142. /package/lib/clang/{17 → 19}/include/__clang_cuda_math_forward_declares.h +0 -0
  143. /package/lib/clang/{17 → 19}/include/__clang_cuda_texture_intrinsics.h +0 -0
  144. /package/lib/clang/{17 → 19}/include/__clang_hip_cmath.h +0 -0
  145. /package/lib/clang/{17 → 19}/include/__clang_hip_libdevice_declares.h +0 -0
  146. /package/lib/clang/{17 → 19}/include/__clang_hip_stdlib.h +0 -0
  147. /package/lib/clang/{17 → 19}/include/__wmmintrin_aes.h +0 -0
  148. /package/lib/clang/{17 → 19}/include/__wmmintrin_pclmul.h +0 -0
  149. /package/lib/clang/{17 → 19}/include/amxcomplexintrin.h +0 -0
  150. /package/lib/clang/{17 → 19}/include/amxfp16intrin.h +0 -0
  151. /package/lib/clang/{17 → 19}/include/amxintrin.h +0 -0
  152. /package/lib/clang/{17 → 19}/include/arm64intr.h +0 -0
  153. /package/lib/clang/{17 → 19}/include/arm_bf16.h +0 -0
  154. /package/lib/clang/{17 → 19}/include/arm_cde.h +0 -0
  155. /package/lib/clang/{17 → 19}/include/arm_cmse.h +0 -0
  156. /package/lib/clang/{17 → 19}/include/arm_mve.h +0 -0
  157. /package/lib/clang/{17 → 19}/include/arm_neon_sve_bridge.h +0 -0
  158. /package/lib/clang/{17 → 19}/include/armintr.h +0 -0
  159. /package/lib/clang/{17 → 19}/include/avxifmaintrin.h +0 -0
  160. /package/lib/clang/{17 → 19}/include/avxneconvertintrin.h +0 -0
  161. /package/lib/clang/{17 → 19}/include/avxvnniint16intrin.h +0 -0
  162. /package/lib/clang/{17 → 19}/include/avxvnniint8intrin.h +0 -0
  163. /package/lib/clang/{17 → 19}/include/avxvnniintrin.h +0 -0
  164. /package/lib/clang/{17 → 19}/include/bmi2intrin.h +0 -0
  165. /package/lib/clang/{17 → 19}/include/cet.h +0 -0
  166. /package/lib/clang/{17 → 19}/include/cetintrin.h +0 -0
  167. /package/lib/clang/{17 → 19}/include/cldemoteintrin.h +0 -0
  168. /package/lib/clang/{17 → 19}/include/clflushoptintrin.h +0 -0
  169. /package/lib/clang/{17 → 19}/include/clwbintrin.h +0 -0
  170. /package/lib/clang/{17 → 19}/include/clzerointrin.h +0 -0
  171. /package/lib/clang/{17 → 19}/include/cmpccxaddintrin.h +0 -0
  172. /package/lib/clang/{17 → 19}/include/crc32intrin.h +0 -0
  173. /package/lib/clang/{17 → 19}/include/cuda_wrappers/bits/basic_string.h +0 -0
  174. /package/lib/clang/{17 → 19}/include/cuda_wrappers/bits/basic_string.tcc +0 -0
  175. /package/lib/clang/{17 → 19}/include/cuda_wrappers/bits/shared_ptr_base.h +0 -0
  176. /package/lib/clang/{17 → 19}/include/cuda_wrappers/cmath +0 -0
  177. /package/lib/clang/{17 → 19}/include/cuda_wrappers/complex +0 -0
  178. /package/lib/clang/{17 → 19}/include/cuda_wrappers/new +0 -0
  179. /package/lib/clang/{17 → 19}/include/enqcmdintrin.h +0 -0
  180. /package/lib/clang/{17 → 19}/include/f16cintrin.h +0 -0
  181. /package/lib/clang/{17 → 19}/include/fma4intrin.h +0 -0
  182. /package/lib/clang/{17 → 19}/include/fxsrintrin.h +0 -0
  183. /package/lib/clang/{17 → 19}/include/hexagon_circ_brev_intrinsics.h +0 -0
  184. /package/lib/clang/{17 → 19}/include/hexagon_protos.h +0 -0
  185. /package/lib/clang/{17 → 19}/include/hexagon_types.h +0 -0
  186. /package/lib/clang/{17 → 19}/include/hlsl.h +0 -0
  187. /package/lib/clang/{17 → 19}/include/hresetintrin.h +0 -0
  188. /package/lib/clang/{17 → 19}/include/htmintrin.h +0 -0
  189. /package/lib/clang/{17 → 19}/include/htmxlintrin.h +0 -0
  190. /package/lib/clang/{17 → 19}/include/hvx_hexagon_protos.h +0 -0
  191. /package/lib/clang/{17 → 19}/include/invpcidintrin.h +0 -0
  192. /package/lib/clang/{17 → 19}/include/llvm_libc_wrappers/inttypes.h +0 -0
  193. /package/lib/clang/{17 → 19}/include/lwpintrin.h +0 -0
  194. /package/lib/clang/{17 → 19}/include/lzcntintrin.h +0 -0
  195. /package/lib/clang/{17 → 19}/include/mm_malloc.h +0 -0
  196. /package/lib/clang/{17 → 19}/include/movdirintrin.h +0 -0
  197. /package/lib/clang/{17 → 19}/include/msa.h +0 -0
  198. /package/lib/clang/{17 → 19}/include/mwaitxintrin.h +0 -0
  199. /package/lib/clang/{17 → 19}/include/nmmintrin.h +0 -0
  200. /package/lib/clang/{17 → 19}/include/openmp_wrappers/__clang_openmp_device_functions.h +0 -0
  201. /package/lib/clang/{17 → 19}/include/openmp_wrappers/complex +0 -0
  202. /package/lib/clang/{17 → 19}/include/openmp_wrappers/complex.h +0 -0
  203. /package/lib/clang/{17 → 19}/include/openmp_wrappers/complex_cmath.h +0 -0
  204. /package/lib/clang/{17 → 19}/include/openmp_wrappers/math.h +0 -0
  205. /package/lib/clang/{17 → 19}/include/openmp_wrappers/new +0 -0
  206. /package/lib/clang/{17 → 19}/include/pconfigintrin.h +0 -0
  207. /package/lib/clang/{17 → 19}/include/pkuintrin.h +0 -0
  208. /package/lib/clang/{17 → 19}/include/popcntintrin.h +0 -0
  209. /package/lib/clang/{17 → 19}/include/ppc_wrappers/bmi2intrin.h +0 -0
  210. /package/lib/clang/{17 → 19}/include/ppc_wrappers/bmiintrin.h +0 -0
  211. /package/lib/clang/{17 → 19}/include/ppc_wrappers/emmintrin.h +0 -0
  212. /package/lib/clang/{17 → 19}/include/ppc_wrappers/immintrin.h +0 -0
  213. /package/lib/clang/{17 → 19}/include/ppc_wrappers/mm_malloc.h +0 -0
  214. /package/lib/clang/{17 → 19}/include/ppc_wrappers/mmintrin.h +0 -0
  215. /package/lib/clang/{17 → 19}/include/ppc_wrappers/pmmintrin.h +0 -0
  216. /package/lib/clang/{17 → 19}/include/ppc_wrappers/tmmintrin.h +0 -0
  217. /package/lib/clang/{17 → 19}/include/ppc_wrappers/x86gprintrin.h +0 -0
  218. /package/lib/clang/{17 → 19}/include/ppc_wrappers/x86intrin.h +0 -0
  219. /package/lib/clang/{17 → 19}/include/ppc_wrappers/xmmintrin.h +0 -0
  220. /package/lib/clang/{17 → 19}/include/prfchiintrin.h +0 -0
  221. /package/lib/clang/{17 → 19}/include/ptwriteintrin.h +0 -0
  222. /package/lib/clang/{17 → 19}/include/raointintrin.h +0 -0
  223. /package/lib/clang/{17 → 19}/include/rdpruintrin.h +0 -0
  224. /package/lib/clang/{17 → 19}/include/rdseedintrin.h +0 -0
  225. /package/lib/clang/{17 → 19}/include/rtmintrin.h +0 -0
  226. /package/lib/clang/{17 → 19}/include/s390intrin.h +0 -0
  227. /package/lib/clang/{17 → 19}/include/serializeintrin.h +0 -0
  228. /package/lib/clang/{17 → 19}/include/sgxintrin.h +0 -0
  229. /package/lib/clang/{17 → 19}/include/sha512intrin.h +0 -0
  230. /package/lib/clang/{17 → 19}/include/shaintrin.h +0 -0
  231. /package/lib/clang/{17 → 19}/include/sm3intrin.h +0 -0
  232. /package/lib/clang/{17 → 19}/include/sm4intrin.h +0 -0
  233. /package/lib/clang/{17 → 19}/include/tbmintrin.h +0 -0
  234. /package/lib/clang/{17 → 19}/include/tgmath.h +0 -0
  235. /package/lib/clang/{17 → 19}/include/tsxldtrkintrin.h +0 -0
  236. /package/lib/clang/{17 → 19}/include/uintrintrin.h +0 -0
  237. /package/lib/clang/{17 → 19}/include/unwind.h +0 -0
  238. /package/lib/clang/{17 → 19}/include/vadefs.h +0 -0
  239. /package/lib/clang/{17 → 19}/include/velintrin.h +0 -0
  240. /package/lib/clang/{17 → 19}/include/velintrin_approx.h +0 -0
  241. /package/lib/clang/{17 → 19}/include/velintrin_gen.h +0 -0
  242. /package/lib/clang/{17 → 19}/include/vpclmulqdqintrin.h +0 -0
  243. /package/lib/clang/{17 → 19}/include/waitpkgintrin.h +0 -0
  244. /package/lib/clang/{17 → 19}/include/wasm_simd128.h +0 -0
  245. /package/lib/clang/{17 → 19}/include/wbnoinvdintrin.h +0 -0
  246. /package/lib/clang/{17 → 19}/include/wmmintrin.h +0 -0
  247. /package/lib/clang/{17 → 19}/include/xopintrin.h +0 -0
  248. /package/lib/clang/{17 → 19}/include/xsavecintrin.h +0 -0
  249. /package/lib/clang/{17 → 19}/include/xsaveintrin.h +0 -0
  250. /package/lib/clang/{17 → 19}/include/xsaveoptintrin.h +0 -0
  251. /package/lib/clang/{17 → 19}/include/xsavesintrin.h +0 -0
  252. /package/lib/clang/{17 → 19}/include/xtestintrin.h +0 -0
@@ -9,6 +9,10 @@
9
9
  #ifndef __CLANG_LIMITS_H
10
10
  #define __CLANG_LIMITS_H
11
11
 
12
+ #if defined(__MVS__) && __has_include_next(<limits.h>)
13
+ #include_next <limits.h>
14
+ #else
15
+
12
16
  /* The system's limits.h may, in turn, try to #include_next GCC's limits.h.
13
17
  Avert this #include_next madness. */
14
18
  #if defined __GNUC__ && !defined _GCC_LIMITS_H_
@@ -66,10 +70,8 @@
66
70
 
67
71
  #define CHAR_BIT __CHAR_BIT__
68
72
 
69
- /* C2x 5.2.4.2.1 */
70
- /* FIXME: This is using the placeholder dates Clang produces for these macros
71
- in C2x mode; switch to the correct values once they've been published. */
72
- #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
73
+ /* C23 5.2.4.2.1 */
74
+ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
73
75
  #define BOOL_WIDTH __BOOL_WIDTH__
74
76
  #define CHAR_WIDTH CHAR_BIT
75
77
  #define SCHAR_WIDTH CHAR_BIT
@@ -124,4 +126,5 @@
124
126
  #define ULONG_LONG_MAX (__LONG_LONG_MAX__*2ULL+1ULL)
125
127
  #endif
126
128
 
129
+ #endif /* __MVS__ */
127
130
  #endif /* __CLANG_LIMITS_H */
@@ -1,4 +1,4 @@
1
- //===-- Wrapper for C standard stdio.h declarations on the GPU ------------===//
1
+ //===-- Wrapper for C standard assert.h declarations on the GPU -*- C++ -*-===//
2
2
  //
3
3
  // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
4
  // See https://llvm.org/LICENSE.txt for license information.
@@ -6,16 +6,16 @@
6
6
  //
7
7
  //===----------------------------------------------------------------------===//
8
8
 
9
- #ifndef __CLANG_LLVM_LIBC_WRAPPERS_STDIO_H__
10
- #define __CLANG_LLVM_LIBC_WRAPPERS_STDIO_H__
9
+ #ifndef __CLANG_LLVM_LIBC_WRAPPERS_ASSERT_H__
10
+ #define __CLANG_LLVM_LIBC_WRAPPERS_ASSERT_H__
11
11
 
12
12
  #if !defined(_OPENMP) && !defined(__HIP__) && !defined(__CUDA__)
13
13
  #error "This file is for GPU offloading compilation only"
14
14
  #endif
15
15
 
16
- #include_next <stdio.h>
16
+ #include_next <assert.h>
17
17
 
18
- #if __has_include(<llvm-libc-decls/stdio.h>)
18
+ #if __has_include(<llvm-libc-decls/assert.h>)
19
19
 
20
20
  #if defined(__HIP__) || defined(__CUDA__)
21
21
  #define __LIBC_ATTRS __attribute__((device))
@@ -23,7 +23,7 @@
23
23
 
24
24
  #pragma omp begin declare target
25
25
 
26
- #include <llvm-libc-decls/stdio.h>
26
+ #include <llvm-libc-decls/assert.h>
27
27
 
28
28
  #pragma omp end declare target
29
29
 
@@ -31,4 +31,4 @@
31
31
 
32
32
  #endif
33
33
 
34
- #endif // __CLANG_LLVM_LIBC_WRAPPERS_STDIO_H__
34
+ #endif // __CLANG_LLVM_LIBC_WRAPPERS_ASSERT_H__
@@ -13,8 +13,19 @@
13
13
  #error "This file is for GPU offloading compilation only"
14
14
  #endif
15
15
 
16
+ // The GNU headers like to define 'toupper' and 'tolower' redundantly. This is
17
+ // necessary to prevent it from doing that and remapping our implementation.
18
+ #if (defined(__NVPTX__) || defined(__AMDGPU__)) && defined(__GLIBC__)
19
+ #pragma push_macro("__USE_EXTERN_INLINES")
20
+ #undef __USE_EXTERN_INLINES
21
+ #endif
22
+
16
23
  #include_next <ctype.h>
17
24
 
25
+ #if (defined(__NVPTX__) || defined(__AMDGPU__)) && defined(__GLIBC__)
26
+ #pragma pop_macro("__USE_EXTERN_INLINES")
27
+ #endif
28
+
18
29
  #if __has_include(<llvm-libc-decls/ctype.h>)
19
30
 
20
31
  #if defined(__HIP__) || defined(__CUDA__)
@@ -26,6 +37,7 @@
26
37
 
27
38
  #pragma push_macro("isalnum")
28
39
  #pragma push_macro("isalpha")
40
+ #pragma push_macro("isascii")
29
41
  #pragma push_macro("isblank")
30
42
  #pragma push_macro("iscntrl")
31
43
  #pragma push_macro("isdigit")
@@ -36,11 +48,13 @@
36
48
  #pragma push_macro("isspace")
37
49
  #pragma push_macro("isupper")
38
50
  #pragma push_macro("isxdigit")
51
+ #pragma push_macro("toascii")
39
52
  #pragma push_macro("tolower")
40
53
  #pragma push_macro("toupper")
41
54
 
42
55
  #undef isalnum
43
56
  #undef isalpha
57
+ #undef isascii
44
58
  #undef iscntrl
45
59
  #undef isdigit
46
60
  #undef islower
@@ -51,6 +65,7 @@
51
65
  #undef isupper
52
66
  #undef isblank
53
67
  #undef isxdigit
68
+ #undef toascii
54
69
  #undef tolower
55
70
  #undef toupper
56
71
 
@@ -64,6 +79,7 @@
64
79
  #if !defined(__NVPTX__) && !defined(__AMDGPU__)
65
80
  #pragma pop_macro("isalnum")
66
81
  #pragma pop_macro("isalpha")
82
+ #pragma pop_macro("isascii")
67
83
  #pragma pop_macro("isblank")
68
84
  #pragma pop_macro("iscntrl")
69
85
  #pragma pop_macro("isdigit")
@@ -74,6 +90,7 @@
74
90
  #pragma pop_macro("isspace")
75
91
  #pragma pop_macro("isupper")
76
92
  #pragma pop_macro("isxdigit")
93
+ #pragma pop_macro("toascii")
77
94
  #pragma pop_macro("tolower")
78
95
  #pragma pop_macro("toupper")
79
96
  #endif
@@ -0,0 +1,80 @@
1
+ //===-- Wrapper for C standard stdio.h declarations on the GPU ------------===//
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
+ #if !defined(_OPENMP) && !defined(__HIP__) && !defined(__CUDA__)
10
+ #error "This file is for GPU offloading compilation only"
11
+ #endif
12
+
13
+ #include_next <stdio.h>
14
+
15
+ // In some old versions of glibc, other standard headers sometimes define
16
+ // special macros (e.g., __need_FILE) before including stdio.h to cause stdio.h
17
+ // to produce special definitions. Future includes of stdio.h when those
18
+ // special macros are undefined are expected to produce the normal definitions
19
+ // from stdio.h.
20
+ //
21
+ // We do not apply our include guard (__CLANG_LLVM_LIBC_WRAPPERS_STDIO_H__)
22
+ // unconditionally to the above include_next. Otherwise, after an occurrence of
23
+ // the first glibc stdio.h use case described above, the include_next would be
24
+ // skipped for remaining includes of stdio.h, leaving required symbols
25
+ // undefined.
26
+ //
27
+ // We make the following assumptions to handle all use cases:
28
+ //
29
+ // 1. If the above include_next produces special glibc definitions, then (a) it
30
+ // does not produce the normal definitions that we must intercept below, (b)
31
+ // the current file was included from a glibc header that already defined
32
+ // __GLIBC__ (usually by including glibc's <features.h>), and (c) the above
33
+ // include_next does not define _STDIO_H. In that case, we skip the rest of
34
+ // the current file and don't guard against future includes.
35
+ // 2. If the above include_next produces the normal stdio.h definitions, then
36
+ // either (a) __GLIBC__ is not defined because C headers are from some other
37
+ // libc implementation or (b) the above include_next defines _STDIO_H to
38
+ // prevent the above include_next from having any effect in the future.
39
+ #if !defined(__GLIBC__) || defined(_STDIO_H)
40
+
41
+ #ifndef __CLANG_LLVM_LIBC_WRAPPERS_STDIO_H__
42
+ #define __CLANG_LLVM_LIBC_WRAPPERS_STDIO_H__
43
+
44
+ #if __has_include(<llvm-libc-decls/stdio.h>)
45
+
46
+ #if defined(__HIP__) || defined(__CUDA__)
47
+ #define __LIBC_ATTRS __attribute__((device))
48
+ #endif
49
+
50
+ // Some headers provide these as macros. Temporarily undefine them so they do
51
+ // not conflict with any definitions for the GPU.
52
+
53
+ #pragma push_macro("stdout")
54
+ #pragma push_macro("stdin")
55
+ #pragma push_macro("stderr")
56
+
57
+ #undef stdout
58
+ #undef stderr
59
+ #undef stdin
60
+
61
+ #pragma omp begin declare target
62
+
63
+ #include <llvm-libc-decls/stdio.h>
64
+
65
+ #pragma omp end declare target
66
+
67
+ #undef __LIBC_ATTRS
68
+
69
+ // Restore the original macros when compiling on the host.
70
+ #if !defined(__NVPTX__) && !defined(__AMDGPU__)
71
+ #pragma pop_macro("stdout")
72
+ #pragma pop_macro("stderr")
73
+ #pragma pop_macro("stdin")
74
+ #endif
75
+
76
+ #endif
77
+
78
+ #endif // __CLANG_LLVM_LIBC_WRAPPERS_STDIO_H__
79
+
80
+ #endif
@@ -23,8 +23,11 @@
23
23
 
24
24
  #pragma omp begin declare target
25
25
 
26
- // The LLVM C library uses this type so we forward declare it.
26
+ // The LLVM C library uses these named types so we forward declare them.
27
27
  typedef void (*__atexithandler_t)(void);
28
+ typedef int (*__bsearchcompare_t)(const void *, const void *);
29
+ typedef int (*__qsortcompare_t)(const void *, const void *);
30
+ typedef int (*__qsortrcompare_t)(const void *, const void *, void *);
28
31
 
29
32
  // Enforce ABI compatibility with the structs used by the LLVM C library.
30
33
  _Static_assert(__builtin_offsetof(div_t, quot) == 0, "ABI mismatch!");
@@ -0,0 +1,96 @@
1
+ //===-- Wrapper for C standard string.h declarations on the GPU -----------===//
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 __CLANG_LLVM_LIBC_WRAPPERS_STRING_H__
10
+ #define __CLANG_LLVM_LIBC_WRAPPERS_STRING_H__
11
+
12
+ #if !defined(_OPENMP) && !defined(__HIP__) && !defined(__CUDA__)
13
+ #error "This file is for GPU offloading compilation only"
14
+ #endif
15
+
16
+ #include_next <string.h>
17
+
18
+ #if __has_include(<llvm-libc-decls/string.h>)
19
+
20
+ #if defined(__HIP__) || defined(__CUDA__)
21
+ #define __LIBC_ATTRS __attribute__((device))
22
+ #endif
23
+
24
+ #pragma omp begin declare target
25
+
26
+ // The GNU headers provide C++ standard compliant headers when in C++ mode and
27
+ // the LLVM libc does not. We need to manually provide the definitions using the
28
+ // same prototypes.
29
+ #if defined(__cplusplus) && defined(__GLIBC__) && \
30
+ defined(__CORRECT_ISO_CPP_STRING_H_PROTO)
31
+
32
+ #ifndef __LIBC_ATTRS
33
+ #define __LIBC_ATTRS
34
+ #endif
35
+
36
+ extern "C" {
37
+ void *memccpy(void *__restrict, const void *__restrict, int,
38
+ size_t) __LIBC_ATTRS;
39
+ int memcmp(const void *, const void *, size_t) __LIBC_ATTRS;
40
+ void *memcpy(void *__restrict, const void *__restrict, size_t) __LIBC_ATTRS;
41
+ void *memmem(const void *, size_t, const void *, size_t) __LIBC_ATTRS;
42
+ void *memmove(void *, const void *, size_t) __LIBC_ATTRS;
43
+ void *mempcpy(void *__restrict, const void *__restrict, size_t) __LIBC_ATTRS;
44
+ void *memset(void *, int, size_t) __LIBC_ATTRS;
45
+ char *stpcpy(char *__restrict, const char *__restrict) __LIBC_ATTRS;
46
+ char *stpncpy(char *__restrict, const char *__restrict, size_t) __LIBC_ATTRS;
47
+ char *strcat(char *__restrict, const char *__restrict) __LIBC_ATTRS;
48
+ int strcmp(const char *, const char *) __LIBC_ATTRS;
49
+ int strcoll(const char *, const char *) __LIBC_ATTRS;
50
+ char *strcpy(char *__restrict, const char *__restrict) __LIBC_ATTRS;
51
+ size_t strcspn(const char *, const char *) __LIBC_ATTRS;
52
+ char *strdup(const char *) __LIBC_ATTRS;
53
+ size_t strlen(const char *) __LIBC_ATTRS;
54
+ char *strncat(char *__restrict, const char *__restrict, size_t) __LIBC_ATTRS;
55
+ int strncmp(const char *, const char *, size_t) __LIBC_ATTRS;
56
+ char *strncpy(char *__restrict, const char *__restrict, size_t) __LIBC_ATTRS;
57
+ char *strndup(const char *, size_t) __LIBC_ATTRS;
58
+ size_t strnlen(const char *, size_t) __LIBC_ATTRS;
59
+ size_t strspn(const char *, const char *) __LIBC_ATTRS;
60
+ char *strtok(char *__restrict, const char *__restrict) __LIBC_ATTRS;
61
+ char *strtok_r(char *__restrict, const char *__restrict,
62
+ char **__restrict) __LIBC_ATTRS;
63
+ size_t strxfrm(char *__restrict, const char *__restrict, size_t) __LIBC_ATTRS;
64
+ }
65
+
66
+ extern "C++" {
67
+ char *strstr(char *, const char *) noexcept __LIBC_ATTRS;
68
+ const char *strstr(const char *, const char *) noexcept __LIBC_ATTRS;
69
+ char *strpbrk(char *, const char *) noexcept __LIBC_ATTRS;
70
+ const char *strpbrk(const char *, const char *) noexcept __LIBC_ATTRS;
71
+ char *strrchr(char *, int) noexcept __LIBC_ATTRS;
72
+ const char *strrchr(const char *, int) noexcept __LIBC_ATTRS;
73
+ char *strchr(char *, int) noexcept __LIBC_ATTRS;
74
+ const char *strchr(const char *, int) noexcept __LIBC_ATTRS;
75
+ char *strchrnul(char *, int) noexcept __LIBC_ATTRS;
76
+ const char *strchrnul(const char *, int) noexcept __LIBC_ATTRS;
77
+ char *strcasestr(char *, const char *) noexcept __LIBC_ATTRS;
78
+ const char *strcasestr(const char *, const char *) noexcept __LIBC_ATTRS;
79
+ void *memrchr(void *__s, int __c, size_t __n) noexcept __LIBC_ATTRS;
80
+ const void *memrchr(const void *__s, int __c, size_t __n) noexcept __LIBC_ATTRS;
81
+ void *memchr(void *__s, int __c, size_t __n) noexcept __LIBC_ATTRS;
82
+ const void *memchr(const void *__s, int __c, size_t __n) noexcept __LIBC_ATTRS;
83
+ }
84
+
85
+ #else
86
+ #include <llvm-libc-decls/string.h>
87
+
88
+ #endif
89
+
90
+ #pragma omp end declare target
91
+
92
+ #undef __LIBC_ATTRS
93
+
94
+ #endif
95
+
96
+ #endif // __CLANG_LLVM_LIBC_WRAPPERS_STRING_H__
@@ -1,4 +1,4 @@
1
- //===-- Wrapper for C standard string.h declarations on the GPU -----------===//
1
+ //===-- Wrapper for C standard time.h declarations on the GPU -------------===//
2
2
  //
3
3
  // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
4
  // See https://llvm.org/LICENSE.txt for license information.
@@ -6,19 +6,16 @@
6
6
  //
7
7
  //===----------------------------------------------------------------------===//
8
8
 
9
- #ifndef __CLANG_LLVM_LIBC_WRAPPERS_STRING_H__
10
- #define __CLANG_LLVM_LIBC_WRAPPERS_STRING_H__
9
+ #ifndef __CLANG_LLVM_LIBC_WRAPPERS_TIME_H__
10
+ #define __CLANG_LLVM_LIBC_WRAPPERS_TIME_H__
11
11
 
12
12
  #if !defined(_OPENMP) && !defined(__HIP__) && !defined(__CUDA__)
13
13
  #error "This file is for GPU offloading compilation only"
14
14
  #endif
15
15
 
16
- // FIXME: The GNU headers provide C++ standard compliant headers when in C++
17
- // mode and the LLVM libc does not. We cannot enable memchr, strchr, strchrnul,
18
- // strpbrk, strrchr, strstr, or strcasestr until this is addressed.
19
- #include_next <string.h>
16
+ #include_next <time.h>
20
17
 
21
- #if __has_include(<llvm-libc-decls/string.h>)
18
+ #if __has_include(<llvm-libc-decls/time.h>)
22
19
 
23
20
  #if defined(__HIP__) || defined(__CUDA__)
24
21
  #define __LIBC_ATTRS __attribute__((device))
@@ -26,12 +23,12 @@
26
23
 
27
24
  #pragma omp begin declare target
28
25
 
29
- #include <llvm-libc-decls/string.h>
26
+ _Static_assert(sizeof(clock_t) == sizeof(long), "ABI mismatch!");
30
27
 
31
- #pragma omp end declare target
28
+ #include <llvm-libc-decls/time.h>
32
29
 
33
- #undef __LIBC_ATTRS
30
+ #pragma omp end declare target
34
31
 
35
32
  #endif
36
33
 
37
- #endif // __CLANG_LLVM_LIBC_WRAPPERS_STRING_H__
34
+ #endif // __CLANG_LLVM_LIBC_WRAPPERS_TIME_H__