aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/TargetInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-06-26 21:52:32 +0000
committerChris Lattner <sabre@nondot.org>2010-06-26 21:52:32 +0000
commit7f215c12af4c3e7f81b24102a676aabfdb4e1566 (patch)
tree55a24deb60276747a4c968a7c9b69accef36f761 /lib/CodeGen/TargetInfo.cpp
parent9a20723df5904f2da9e4da14bf127366609b5cd8 (diff)
use more efficient type comparison predicates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106958 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetInfo.cpp')
-rw-r--r--lib/CodeGen/TargetInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp
index 1de0ebc41c..667220063b 100644
--- a/lib/CodeGen/TargetInfo.cpp
+++ b/lib/CodeGen/TargetInfo.cpp
@@ -1076,7 +1076,7 @@ void X86_64ABIInfo::classify(QualType Ty,
ABIArgInfo X86_64ABIInfo::getCoerceResult(QualType Ty,
const llvm::Type *CoerceTo,
ASTContext &Context) const {
- if (CoerceTo == llvm::Type::getInt64Ty(CoerceTo->getContext())) {
+ if (CoerceTo->isIntegerTy(64)) {
// Integer and pointer types will end up in a general purpose
// register.
@@ -1087,7 +1087,7 @@ ABIArgInfo X86_64ABIInfo::getCoerceResult(QualType Ty,
if (Ty->isIntegralOrEnumerationType() || Ty->hasPointerRepresentation())
return (Ty->isPromotableIntegerType() ?
ABIArgInfo::getExtend() : ABIArgInfo::getDirect());
- } else if (CoerceTo == llvm::Type::getDoubleTy(CoerceTo->getContext())) {
+ } else if (CoerceTo->isDoubleTy()) {
assert(Ty.isCanonical() && "should always have a canonical type here");
assert(!Ty.hasQualifiers() && "should never have a qualified type here");