summaryrefslogtreecommitdiffstats
path: root/clang/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
commitb1c22fe9b7364ba668bcf0124d3e841695f63551 (patch)
tree985f0fef84377bc0eaf13deef97ecdf0ea8436db /clang/lib/AST/ASTContext.cpp
parent216f64379fc47f7a3803985fdee25a16abe6b570 (diff)
downloadbcm5719-llvm-b1c22fe9b7364ba668bcf0124d3e841695f63551.tar.gz
bcm5719-llvm-b1c22fe9b7364ba668bcf0124d3e841695f63551.zip
Add Type::isSpecificBuiltinType as a shortcut.
llvm-svn: 64946
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 6b49b85c243..9198bf71cda 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud