[Openmp-commits] [PATCH] D145307: [OpenMP][CUDA] Get rid of redundant macro def

Shao-Ce SUN via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sat Mar 4 09:57:59 PST 2023


sunshaoce created this revision.
sunshaoce added reviewers: jdoerfert, jhuber6.
Herald added subscribers: mattd, guansong, yaxunl.
Herald added a project: All.
sunshaoce requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.

Resolve warning of `TARGET_NAME` macro redefinition.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145307

Files:
  openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.cpp


Index: openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.cpp
===================================================================
--- openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.cpp
+++ openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.cpp
@@ -85,8 +85,12 @@
 #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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145307.502378.patch
Type: text/x-patch
Size: 556 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230304/6ae43086/attachment.bin>


More information about the Openmp-commits mailing list