[AMDGPU] Clean up symbols in the global namespace.
llvm-svn: 317051
diff --git a/llvm/lib/Target/AMDGPU/AMDGPU.h b/llvm/lib/Target/AMDGPU/AMDGPU.h
index e8f7476..0ddc43a 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPU.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPU.h
@@ -217,39 +217,44 @@
unsigned FLAT_ADDRESS; ///< Address space for flat memory.
unsigned REGION_ADDRESS; ///< Address space for region memory.
- // The maximum value for flat, generic, local, private, constant and region.
- const static unsigned MAX_COMMON_ADDRESS = 5;
+ enum : unsigned {
+ // The maximum value for flat, generic, local, private, constant and region.
+ MAX_COMMON_ADDRESS = 5,
- const static unsigned GLOBAL_ADDRESS = 1; ///< Address space for global memory (RAT0, VTX0).
- const static unsigned CONSTANT_ADDRESS = 2; ///< Address space for constant memory (VTX2)
- const static unsigned LOCAL_ADDRESS = 3; ///< Address space for local memory.
- const static unsigned PARAM_D_ADDRESS = 6; ///< Address space for direct addressible parameter memory (CONST0)
- const static unsigned PARAM_I_ADDRESS = 7; ///< Address space for indirect addressible parameter memory (VTX1)
+ GLOBAL_ADDRESS = 1, ///< Address space for global memory (RAT0, VTX0).
+ CONSTANT_ADDRESS = 2, ///< Address space for constant memory (VTX2)
+ LOCAL_ADDRESS = 3, ///< Address space for local memory.
+ /// Address space for direct addressible parameter memory (CONST0)
+ PARAM_D_ADDRESS = 6,
+ /// Address space for indirect addressible parameter memory (VTX1)
+ PARAM_I_ADDRESS = 7,
- // Do not re-order the CONSTANT_BUFFER_* enums. Several places depend on this
- // order to be able to dynamically index a constant buffer, for example:
- //
- // ConstantBufferAS = CONSTANT_BUFFER_0 + CBIdx
+ // Do not re-order the CONSTANT_BUFFER_* enums. Several places depend on
+ // this order to be able to dynamically index a constant buffer, for
+ // example:
+ //
+ // ConstantBufferAS = CONSTANT_BUFFER_0 + CBIdx
- const static unsigned CONSTANT_BUFFER_0 = 8;
- const static unsigned CONSTANT_BUFFER_1 = 9;
- const static unsigned CONSTANT_BUFFER_2 = 10;
- const static unsigned CONSTANT_BUFFER_3 = 11;
- const static unsigned CONSTANT_BUFFER_4 = 12;
- const static unsigned CONSTANT_BUFFER_5 = 13;
- const static unsigned CONSTANT_BUFFER_6 = 14;
- const static unsigned CONSTANT_BUFFER_7 = 15;
- const static unsigned CONSTANT_BUFFER_8 = 16;
- const static unsigned CONSTANT_BUFFER_9 = 17;
- const static unsigned CONSTANT_BUFFER_10 = 18;
- const static unsigned CONSTANT_BUFFER_11 = 19;
- const static unsigned CONSTANT_BUFFER_12 = 20;
- const static unsigned CONSTANT_BUFFER_13 = 21;
- const static unsigned CONSTANT_BUFFER_14 = 22;
- const static unsigned CONSTANT_BUFFER_15 = 23;
+ CONSTANT_BUFFER_0 = 8,
+ CONSTANT_BUFFER_1 = 9,
+ CONSTANT_BUFFER_2 = 10,
+ CONSTANT_BUFFER_3 = 11,
+ CONSTANT_BUFFER_4 = 12,
+ CONSTANT_BUFFER_5 = 13,
+ CONSTANT_BUFFER_6 = 14,
+ CONSTANT_BUFFER_7 = 15,
+ CONSTANT_BUFFER_8 = 16,
+ CONSTANT_BUFFER_9 = 17,
+ CONSTANT_BUFFER_10 = 18,
+ CONSTANT_BUFFER_11 = 19,
+ CONSTANT_BUFFER_12 = 20,
+ CONSTANT_BUFFER_13 = 21,
+ CONSTANT_BUFFER_14 = 22,
+ CONSTANT_BUFFER_15 = 23,
- // Some places use this if the address space can't be determined.
- const static unsigned UNKNOWN_ADDRESS_SPACE = ~0u;
+ // Some places use this if the address space can't be determined.
+ UNKNOWN_ADDRESS_SPACE = ~0u,
+ };
};
namespace llvm {