From 600904907667dfd9f1058e725a38f802be990a0f Mon Sep 17 00:00:00 2001 From: Guillaume Chatelet Date: Tue, 7 Feb 2023 12:57:52 +0000 Subject: [PATCH] [libc][NFC] Use LIBC_TARGET_IS_GPU instead of defining PACKAGE_FOR_GPU --- libc/src/__support/common.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libc/src/__support/common.h b/libc/src/__support/common.h index 2aaa8f8..333f897 100644 --- a/libc/src/__support/common.h +++ b/libc/src/__support/common.h @@ -9,6 +9,8 @@ #ifndef LLVM_LIBC_SUPPORT_COMMON_H #define LLVM_LIBC_SUPPORT_COMMON_H +#include "src/__support/macros/architectures.h" + #define LIBC_INLINE_ASM __asm__ __volatile__ #ifndef likely @@ -29,12 +31,8 @@ #define LIBC_INLINE inline #endif -#if defined(__AMDGPU__) || defined(__NVPTX__) -#define PACKAGE_FOR_GPU -#endif - // GPU targets do not support aliasing. -#if defined(LLVM_LIBC_PUBLIC_PACKAGING) && defined(PACKAGE_FOR_GPU) +#if defined(LLVM_LIBC_PUBLIC_PACKAGING) && defined(LIBC_TARGET_IS_GPU) #define LLVM_LIBC_FUNCTION(type, name, arglist) \ LLVM_LIBC_FUNCTION_ATTR decltype(__llvm_libc::name) \ __##name##_impl__ __asm__(#name); \ -- 2.7.4