[llvm] 0b43d57 - [AMDGPU] clang-tidy: replace macro with enum. NFC.

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 16 08:38:11 PDT 2024


Author: Jay Foad
Date: 2024-07-16T16:37:34+01:00
New Revision: 0b43d573f54c16f8ccd231ae40a4704a93ab4aa1

URL: https://github.com/llvm/llvm-project/commit/0b43d573f54c16f8ccd231ae40a4704a93ab4aa1
DIFF: https://github.com/llvm/llvm-project/commit/0b43d573f54c16f8ccd231ae40a4704a93ab4aa1.diff

LOG: [AMDGPU] clang-tidy: replace macro with enum. NFC.

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
    llvm/lib/Target/AMDGPU/R600MachineCFGStructurizer.cpp
    llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
index 4d3474892f1ad..42a6bac4fa6f2 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
@@ -34,7 +34,7 @@
 using namespace llvm;
 
 #define DEBUG_TYPE "printfToRuntime"
-#define DWORD_ALIGN 4
+enum { DWORD_ALIGN = 4 };
 
 namespace {
 class AMDGPUPrintfRuntimeBinding final : public ModulePass {

diff  --git a/llvm/lib/Target/AMDGPU/R600MachineCFGStructurizer.cpp b/llvm/lib/Target/AMDGPU/R600MachineCFGStructurizer.cpp
index c8152c1f920df..3aa8dd8c52162 100644
--- a/llvm/lib/Target/AMDGPU/R600MachineCFGStructurizer.cpp
+++ b/llvm/lib/Target/AMDGPU/R600MachineCFGStructurizer.cpp
@@ -24,7 +24,7 @@ using namespace llvm;
 
 #define DEBUG_TYPE "structcfg"
 
-#define DEFAULT_VEC_SLOTS 8
+enum { DEFAULT_VEC_SLOTS = 8 };
 
 // TODO: move-begin.
 

diff  --git a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
index d9db0f7a4f531..bf8e61b554fae 100644
--- a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
@@ -26,7 +26,7 @@
 #include <optional>
 #include <vector>
 
-#define MAX_LANES 64
+enum { MAX_LANES = 64 };
 
 using namespace llvm;
 


        


More information about the llvm-commits mailing list