[llvm] r278762 - [AMDGPU] Give enum an explicit 64-bit type to fix MSVC 2013 failures

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 15 16:54:44 PDT 2016


Author: rnk
Date: Mon Aug 15 18:54:44 2016
New Revision: 278762

URL: http://llvm.org/viewvc/llvm-project?rev=278762&view=rev
Log:
[AMDGPU] Give enum an explicit 64-bit type to fix MSVC 2013 failures

Recall that MSVC always gives enums the type 'int', nothing else.  MSVC
2015 does not appear to have this problem anymore.

Clang-cl -Wmicrosoft-enum-value flags this, FWIW, so now I have a true
positive for my warning. :)

Modified:
    llvm/trunk/lib/Target/AMDGPU/R600InstrInfo.h

Modified: llvm/trunk/lib/Target/AMDGPU/R600InstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/R600InstrInfo.h?rev=278762&r1=278761&r2=278762&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/R600InstrInfo.h (original)
+++ llvm/trunk/lib/Target/AMDGPU/R600InstrInfo.h Mon Aug 15 18:54:44 2016
@@ -21,7 +21,7 @@
 namespace llvm {
 
 namespace R600InstrFlags {
-enum {
+enum : uint64_t {
  REGISTER_STORE = UINT64_C(1) << 62,
  REGISTER_LOAD = UINT64_C(1) << 63
 };




More information about the llvm-commits mailing list