[PATCH] D34279: Fix release_40 build with MSVC (VS 2015)

Ivan Donchevskii via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 16 07:01:54 PDT 2017


yvvan created this revision.

I currently have narrowing conversion error without that fix.
I try building with 64 and 32 bit compilers - both reproduce that error.


https://reviews.llvm.org/D34279

Files:
  include/llvm/Target/TargetOpcodes.h


Index: include/llvm/Target/TargetOpcodes.h
===================================================================
--- include/llvm/Target/TargetOpcodes.h
+++ include/llvm/Target/TargetOpcodes.h
@@ -19,7 +19,7 @@
 /// Invariant opcodes: All instruction sets have these as their low opcodes.
 ///
 namespace TargetOpcode {
-enum {
+enum : unsigned {
 #define HANDLE_TARGET_OPCODE(OPC) OPC,
 #define HANDLE_TARGET_OPCODE_MARKER(IDENT, OPC) IDENT = OPC,
 #include "llvm/Target/TargetOpcodes.def"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34279.102821.patch
Type: text/x-patch
Size: 489 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170616/e4859083/attachment.bin>


More information about the cfe-commits mailing list