Skip to content

Commit b1adf03

Browse files
authored
[SYCL] Missing C++ cstdint include (#12087)
Fix a test compilation error with g++ 13 on Ubuntu 23.10. Replace also a C header include with the official C++ one. Bug context: ``` /home/rkeryell/Xilinx/Projects/LLVM/worktrees/intel/llvm/clang/test/Driver/clang-offload-wrapper-exe.cpp:55:3: error: unknown type name 'uint32_t' 55 | uint32_t Type; // pi_property_type | ^ /home/rkeryell/Xilinx/Projects/LLVM/worktrees/intel/llvm/clang/test/Driver/clang-offload-wrapper-exe.cpp:56:3: error: unknown type name 'uint64_t' 56 | uint64_t ValSize; // size of property value in bytes | ^ /home/rkeryell/Xilinx/Projects/LLVM/worktrees/intel/llvm/clang/test/Driver/clang-offload-wrapper-exe.cpp:70:3: error: unknown type name 'uint16_t' 70 | uint16_t Version; | ^ /home/rkeryell/Xilinx/Projects/LLVM/worktrees/intel/llvm/clang/test/Driver/clang-offload-wrapper-exe.cpp:71:3: error: unknown type name 'uint8_t' 71 | uint8_t Kind; // 4 for SYCL | ^ /home/rkeryell/Xilinx/Projects/LLVM/worktrees/intel/llvm/clang/test/Driver/clang-offload-wrapper-exe.cpp:72:3: error: unknown type name 'uint8_t' 72 | uint8_t Format; // 1 for native | ^ /home/rkeryell/Xilinx/Projects/LLVM/worktrees/intel/llvm/clang/test/Driver/clang-offload-wrapper-exe.cpp:88:3: error: unknown type name 'uint16_t' 88 | uint16_t Version; | ^ /home/rkeryell/Xilinx/Projects/LLVM/worktrees/intel/llvm/clang/test/Driver/clang-offload-wrapper-exe.cpp:89:3: error: unknown type name 'uint16_t' 89 | uint16_t NumDeviceBinaries; | ^ 7 errors generated. ```
1 parent 4d95237 commit b1adf03

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/test/Driver/clang-offload-wrapper-exe.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
// RUN: %t.batch.exe > %t.batch.exe.out
3333
// RUN: diff -b %t.batch.exe.out %t.all
3434

35-
#include <assert.h>
35+
#include <cassert>
36+
#include <cstdint>
3637
#include <cstring>
3738
#include <iostream>
3839
#include <string>

0 commit comments

Comments
 (0)