[OpenMP][AMDGPU] Get rid of redundant macro def
authorShilei Tian <i@tianshilei.me>
Thu, 19 Jan 2023 01:08:10 +0000 (20:08 -0500)
committerShilei Tian <i@tianshilei.me>
Thu, 19 Jan 2023 01:08:18 +0000 (20:08 -0500)
The next gen plugin adds the def of `DEBUG_PREFIX` in CMake, causing
compiler warning that `DEBUG_PREFIX` is defined multiple times. This patch simply
guards the macro def.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D142064

openmp/libomptarget/plugins/amdgpu/dynamic_hsa/hsa.cpp

index 19705bd..8f73a03 100644 (file)
@@ -77,7 +77,9 @@ DLWRAP_FINALIZE()
 #ifndef TARGET_NAME
 #error "Missing TARGET_NAME macro"
 #endif
+#ifndef DEBUG_PREFIX
 #define DEBUG_PREFIX "Target " GETNAME(TARGET_NAME) " RTL"
+#endif
 
 static bool checkForHSA() {
   // return true if dlopen succeeded and all functions found