From: Reid Kleckner Date: Wed, 15 Mar 2017 17:43:40 +0000 (+0000) Subject: Move some LAST_* enum sentinels out of their enums X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=66224eb9283322b511edb2c7452fb07ab4849740;p=llvm 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297863 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/ISDOpcodes.h b/include/llvm/CodeGen/ISDOpcodes.h index d595d43af50..ee3fd0bdda2 100644 --- a/include/llvm/CodeGen/ISDOpcodes.h +++ b/include/llvm/CodeGen/ISDOpcodes.h @@ -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); //===--------------------------------------------------------------------===//