[llvm] r297863 - Move some LAST_* enum sentinels out of their enums
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 15 10:43:41 PDT 2017
Author: rnk
Date: Wed Mar 15 12:43:40 2017
New Revision: 297863
URL: http://llvm.org/viewvc/llvm-project?rev=297863&view=rev
Log:
Move some LAST_* enum sentinels out of their enums
These are not valid values of the enum, so this will improve clang
-Wcovered-switch-default diagnostics. It also fixes some
-Wbitfield-enum-conversion warnings.
Modified:
llvm/trunk/include/llvm/CodeGen/ISDOpcodes.h
Modified: llvm/trunk/include/llvm/CodeGen/ISDOpcodes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ISDOpcodes.h?rev=297863&r1=297862&r2=297863&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ISDOpcodes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ISDOpcodes.h Wed Mar 15 12:43:40 2017
@@ -814,10 +814,11 @@ namespace ISD {
PRE_INC,
PRE_DEC,
POST_INC,
- POST_DEC,
- LAST_INDEXED_MODE
+ POST_DEC
};
+ static const int LAST_INDEXED_MODE = POST_DEC + 1;
+
//===--------------------------------------------------------------------===//
/// LoadExtType enum - This enum defines the three variants of LOADEXT
/// (load with extension).
@@ -832,10 +833,11 @@ namespace ISD {
NON_EXTLOAD = 0,
EXTLOAD,
SEXTLOAD,
- ZEXTLOAD,
- LAST_LOADEXT_TYPE
+ ZEXTLOAD
};
+ static const int LAST_LOADEXT_TYPE = ZEXTLOAD + 1;
+
NodeType getExtForLoadExtType(bool IsFP, LoadExtType);
//===--------------------------------------------------------------------===//
More information about the llvm-commits
mailing list