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
25 lines
650 B
C
25 lines
650 B
C
//===--------- LibC.h - Simple implementation of libc functions --- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef OMPTARGET_LIBC_H
|
|
#define OMPTARGET_LIBC_H
|
|
|
|
#include "Types.h"
|
|
|
|
extern "C" {
|
|
|
|
int memcmp(const void *lhs, const void *rhs, size_t count);
|
|
|
|
int printf(const char *format, ...);
|
|
}
|
|
|
|
#endif
|