[PATCH] D68827: [DDG] Data Dependence Graph - Pi Block
Michael Kruse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 1 13:04:46 PDT 2019
Meinersbur added inline comments.
================
Comment at: llvm/include/llvm/ADT/EnumeratedArray.h:21
+template <typename ValueType, typename Enumeration,
+ Enumeration LargestEnum = Enumeration::Count,
+ typename IndexType = int,
----------------
Thanks a lot!
Could we change `Enumeration::Count` to `Enumaration::Last`? The reason is that `::Count` introduces a new element that compilers warn about if unhanded in switch statements. That is, instead of
```
enum class E {
One,
Two,
Count
};
switch (e) {
case E::One:
case E::Two:
break;
}
```
`warning: enumerator 'E::Count' in switch of enum 'E' is not handled`
use
```
enum class E {
One,
Two,
Last = Two
};
switch (e) {
case E::One:
case E::Two:
break;
}
```
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68827/new/
https://reviews.llvm.org/D68827
More information about the llvm-commits
mailing list