[Openmp-commits] [openmp] 3ff1726 - [OpenMP][AMDGPU] Get rid of redundant macro def

Shilei Tian via Openmp-commits openmp-commits at lists.llvm.org
Wed Jan 18 17:08:23 PST 2023


Author: Shilei Tian
Date: 2023-01-18T20:08:18-05:00
New Revision: 3ff1726cf8025b94db8d3b8fdf4cc79a7888d80f

URL: https://github.com/llvm/llvm-project/commit/3ff1726cf8025b94db8d3b8fdf4cc79a7888d80f
DIFF: https://github.com/llvm/llvm-project/commit/3ff1726cf8025b94db8d3b8fdf4cc79a7888d80f.diff

LOG: [OpenMP][AMDGPU] Get rid of redundant macro def

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/plugins/amdgpu/dynamic_hsa/hsa.cpp b/openmp/libomptarget/plugins/amdgpu/dynamic_hsa/hsa.cpp
index 19705bddb1cf0..8f73a03cfeebb 100644
--- a/openmp/libomptarget/plugins/amdgpu/dynamic_hsa/hsa.cpp
+++ b/openmp/libomptarget/plugins/amdgpu/dynamic_hsa/hsa.cpp
@@ -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


        


More information about the Openmp-commits mailing list