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.

llvm-svn: 297863
This commit is contained in:
Reid Kleckner 2017-03-15 17:43:40 +00:00
parent 5e895cf2c3
commit 9d53b6ab48
1 changed files with 6 additions and 4 deletions

View File

@ -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);
//===--------------------------------------------------------------------===//