[llvm] a955711 - [Attributor] Qualify variables to avoid clashes in the future

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 4 19:45:09 PDT 2022


Author: Johannes Doerfert
Date: 2022-10-04T19:43:04-07:00
New Revision: a9557115b47b1998dbe41a18c4582d1152d9829a

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

LOG: [Attributor] Qualify variables to avoid clashes in the future

Added: 
    

Modified: 
    llvm/lib/Transforms/IPO/AttributorAttributes.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
index a0dcd36ac45d5..6986a6d679343 100644
--- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
@@ -1012,7 +1012,7 @@ struct AAPointerInfoImpl
     const DominatorTree *DT =
         InfoCache.getAnalysisResultForFunction<DominatorTreeAnalysis>(Scope);
 
-    enum GPUAddressSpace : unsigned {
+    enum class GPUAddressSpace : unsigned {
       Generic = 0,
       Global = 1,
       Shared = 3,
@@ -1027,7 +1027,7 @@ struct AAPointerInfoImpl
       Triple T(M.getTargetTriple());
       if (!(T.isAMDGPU() || T.isNVPTX()))
         return false;
-      switch (V->getType()->getPointerAddressSpace()) {
+      switch (GPUAddressSpace(V->getType()->getPointerAddressSpace())) {
       case GPUAddressSpace::Shared:
       case GPUAddressSpace::Constant:
       case GPUAddressSpace::Local:


        


More information about the llvm-commits mailing list