diff options
| author | Joseph Huber <huberjn@outlook.com> | 2024-09-13 11:22:44 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-13 13:22:44 -0500 |
| commit | c3ac3fe8259b4ae85736ca81fa30e4098123e0b4 (patch) | |
| tree | 545498280e49458a41285f782fe9a8eb2288125f /offload/include/Shared | |
| parent | 39f2d2f156ba8af31a15f6df223d3cb57c7a4906 (diff) | |
[OpenMP] Fix redefining `stdint.h` types (#108607)
Summary:
We can include `stdint.h` just fine as long as we don't allow it to find
system headers, passing `-nostdlibinc` and `-nogpuinc` suppresses these
extra paths so we will just use the clang resource headers for
`stdint.h` and `stddef.h`.
Diffstat (limited to 'offload/include/Shared')
| -rw-r--r-- | offload/include/Shared/Environment.h | 6 | ||||
| -rw-r--r-- | offload/include/Shared/Types.h | 22 | ||||
| -rw-r--r-- | offload/include/Shared/Utils.h | 2 |
3 files changed, 4 insertions, 26 deletions
diff --git a/offload/include/Shared/Environment.h b/offload/include/Shared/Environment.h index d141146b6bd5..147583c209fc 100644 --- a/offload/include/Shared/Environment.h +++ b/offload/include/Shared/Environment.h @@ -13,13 +13,13 @@ #ifndef OMPTARGET_SHARED_ENVIRONMENT_H #define OMPTARGET_SHARED_ENVIRONMENT_H +#include <stdint.h> + #ifdef OMPTARGET_DEVICE_RUNTIME -#include "Types.h" +#include "DeviceTypes.h" #else #include "SourceInfo.h" -#include <cstdint> - using IdentTy = ident_t; #endif diff --git a/offload/include/Shared/Types.h b/offload/include/Shared/Types.h deleted file mode 100644 index 15e3cfefa37e..000000000000 --- a/offload/include/Shared/Types.h +++ /dev/null @@ -1,22 +0,0 @@ -//===-- Shared/Types.h - Type defs shared between host and device - 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 -// -//===----------------------------------------------------------------------===// -// -// Environments shared between host and device. -// -//===----------------------------------------------------------------------===// - -#ifndef OMPTARGET_SHARED_TYPES_H -#define OMPTARGET_SHARED_TYPES_H - -#ifndef OMPTARGET_DEVICE_RUNTIME -#include <cstdint> -#else -#include "DeviceTypes.h" -#endif - -#endif // OMPTARGET_SHARED_TYPES_H diff --git a/offload/include/Shared/Utils.h b/offload/include/Shared/Utils.h index da83551fffd5..83a82678312c 100644 --- a/offload/include/Shared/Utils.h +++ b/offload/include/Shared/Utils.h @@ -14,7 +14,7 @@ #ifndef OMPTARGET_SHARED_UTILS_H #define OMPTARGET_SHARED_UTILS_H -#include "Types.h" +#include <stdint.h> namespace utils { |
