[OpenMP][DeviceRTL] Implement libc function `memcmp`
authorShilei Tian <i@tianshilei.me>
Thu, 4 Aug 2022 18:37:47 +0000 (14:37 -0400)
committerShilei Tian <i@tianshilei.me>
Thu, 4 Aug 2022 18:37:54 +0000 (14:37 -0400)
commitdb5a2afa62428a461f17de30fc410c20d12fe201
tree4e11c23d434033d8b92ce62d055cb7576260f3cc
parentffb8d4a958acf6f00fee7c938e607658cecc4750
[OpenMP][DeviceRTL] Implement libc function `memcmp`

We will add some simple implementation of libc functions starting from
this patch, and the first one is `memcmp`, which is reported in #56929. Note that
`malloc` and `free` are not included in this patch because of the use of
`declare variant`. In the near future we will implement the two functions w/o
using any vendor provided function.

This fixes #56929.

Reviewed By: jhuber6

Differential Revision: https://reviews.llvm.org/D131182
openmp/libomptarget/DeviceRTL/CMakeLists.txt
openmp/libomptarget/DeviceRTL/include/Debug.h
openmp/libomptarget/DeviceRTL/include/LibC.h [new file with mode: 0644]
openmp/libomptarget/DeviceRTL/include/Types.h
openmp/libomptarget/DeviceRTL/src/Debug.cpp
openmp/libomptarget/DeviceRTL/src/LibC.cpp [new file with mode: 0644]
openmp/libomptarget/DeviceRTL/src/exports
openmp/libomptarget/test/offloading/test_libc.cpp [new file with mode: 0644]