This patch uses cast instead of dyn_cast which will assert if the type doesn't match.
Reviewed By: erichkeane
Differential Revision: https://reviews.llvm.org/D151469
assert(!T->isDependentType() && "unexpected dependent type");
QualType CanTy = T.getCanonicalType();
- const BuiltinType *BT = dyn_cast<BuiltinType>(CanTy);
switch (CanTy->getTypeClass()) {
#define TYPE(ID, BASE)
llvm_unreachable("unexpected non-canonical or dependent type");
case Type::Builtin:
- switch (BT->getKind()) {
+ switch (cast<BuiltinType>(CanTy)->getKind()) {
#define BUILTIN_TYPE(ID, SINGLETON_ID)
#define SIGNED_TYPE(ID, SINGLETON_ID) \
case BuiltinType::ID: return GCCTypeClass::Integer;