|
19 | 19 | #include "DemangleConfig.h"
|
20 | 20 | #include "StringViewExtras.h"
|
21 | 21 | #include "Utility.h"
|
| 22 | +#include "llvm/Support/Compiler.h" |
22 | 23 | #include <algorithm>
|
23 | 24 | #include <cctype>
|
24 | 25 | #include <cstdio>
|
@@ -164,18 +165,18 @@ class NodeArray;
|
164 | 165 | // traversed by the printLeft/Right functions to produce a demangled string.
|
165 | 166 | class Node {
|
166 | 167 | public:
|
167 |
| - enum Kind : unsigned char { |
| 168 | + enum Kind : unsigned { |
168 | 169 | #define NODE(NodeKind) K##NodeKind,
|
169 | 170 | #include "ItaniumNodes.def"
|
170 | 171 | };
|
171 | 172 |
|
172 | 173 | /// Three-way bool to track a cached value. Unknown is possible if this node
|
173 | 174 | /// has an unexpanded parameter pack below it that may affect this cache.
|
174 |
| - enum class Cache : unsigned char { Yes, No, Unknown, }; |
| 175 | + enum class Cache : unsigned { Yes, No, Unknown, }; |
175 | 176 |
|
176 | 177 | /// Operator precedence for expression nodes. Used to determine required
|
177 | 178 | /// parens in expression emission.
|
178 |
| - enum class Prec { |
| 179 | + enum class Prec : unsigned { |
179 | 180 | Primary,
|
180 | 181 | Postfix,
|
181 | 182 | Unary,
|
@@ -2995,7 +2996,8 @@ template <typename Derived, typename Alloc> struct AbstractManglingParser {
|
2995 | 2996 | };
|
2996 | 2997 | char Enc[2]; // Encoding
|
2997 | 2998 | OIKind Kind; // Kind of operator
|
2998 |
| - bool Flag : 1; // Entry-specific flag |
| 2999 | + LLVM_PREFERRED_TYPE(bool) |
| 3000 | + unsigned Flag : 1; // Entry-specific flag |
2999 | 3001 | Node::Prec Prec : 7; // Precedence
|
3000 | 3002 | const char *Name; // Spelling
|
3001 | 3003 |
|
|
0 commit comments