| 47 | #define COUNT_OF(x) (sizeof(x) / sizeof((x)[0])) |
| 48 | |
| 49 | const char* Primitive::PrettyDescriptor(Primitive::Type type) { |
| 50 | static_assert(COUNT_OF(kTypeNames) == static_cast<size_t>(Primitive::kPrimLast) + 1, |
| 51 | "Missing element"); |
| 52 | CHECK(Primitive::kPrimNot <= type && type <= Primitive::kPrimVoid) << static_cast<int>(type); |
| 53 | return kTypeNames[type]; |
| 54 | } |
| 55 | |
| 56 | const char* Primitive::BoxedDescriptor(Primitive::Type type) { |
| 57 | static_assert(COUNT_OF(kBoxedDescriptors) == static_cast<size_t>(Primitive::kPrimLast) + 1, |
nothing calls this directly
no outgoing calls
no test coverage detected