Add Type::isSpecificBuiltinType as a shortcut.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64946 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 6b49b85..9198bf7 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -468,9 +468,8 @@
unsigned ABIAlign = getTypeAlign(T);
// Doubles should be naturally aligned if possible.
- if (const BuiltinType *BT = dyn_cast<BuiltinType>(getCanonicalType(T)))
- if (BT->getKind() == BuiltinType::Double)
- return std::max(ABIAlign, 64U);
+ if (T->isSpecificBuiltinType(BuiltinType::Double))
+ return std::max(ABIAlign, 64U);
return ABIAlign;
}