Now we'll get a warning if we miss a case. Refinement of r199800.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199868
91177308-0d34-0410-b5e6-
96231b3b80d8
}
void dump(raw_ostream &OS) const {
- static const char *const Table[] = {
- "Allocated",
- "Released",
- "Relinquished",
- "Escaped"
- };
- OS << Table[(unsigned) K];
+ switch (static_cast<Kind>(K)) {
+#define CASE(ID) case ID: OS << #ID; break;
+ CASE(Allocated)
+ CASE(Released)
+ CASE(Relinquished)
+ CASE(Escaped)
+ }
}
LLVM_DUMP_METHOD void dump() const { dump(llvm::errs()); }