aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-02-18 19:59:32 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-02-18 19:59:32 +0000
commite00d5c00f35163308a18ec1d3d2b9dfa1ecaf234 (patch)
tree310f56c70cd4236ec7fb860a29d4e5112a7ed98e /lib/AST/ASTContext.cpp
parent6aee306b1c653bc7d86ae6cb2b905e8b8d0ac27f (diff)
Add Type::isSpecificBuiltinType as a shortcut.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64946 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r--lib/AST/ASTContext.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 6b49b85c24..9198bf71cd 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -468,9 +468,8 @@ unsigned ASTContext::getPreferredTypeAlign(const Type *T) {
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;
}