From 420d2fcac9ceb0abedaa092002e89ef7a548af30 Mon Sep 17 00:00:00 2001 From: Shao-Ce SUN Date: Sun, 5 Mar 2023 01:55:55 +0800 Subject: [PATCH] [OpenMP][CUDA] Get rid of redundant macro def Resolve warning of `TARGET_NAME` macro redefinition. Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D145307 --- openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.cpp b/openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.cpp index 8f9ccec..2271b3a 100644 --- a/openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.cpp +++ b/openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.cpp @@ -85,8 +85,12 @@ DLWRAP_FINALIZE() #define DYNAMIC_CUDA_PATH "libcuda.so" #endif +#ifndef TARGET_NAME #define TARGET_NAME CUDA +#endif +#ifndef DEBUG_PREFIX #define DEBUG_PREFIX "Target " GETNAME(TARGET_NAME) " RTL" +#endif static bool checkForCUDA() { // return true if dlopen succeeded and all functions found -- 2.7.4