aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-04-27 02:26:03 +0000
committerChris Lattner <sabre@nondot.org>2002-04-27 02:26:03 +0000
commitc72114ca728dcffb9fb92cc63c9fd71b9be58645 (patch)
treeb238dc3cef7c7bc0f0cf439bfcfe811ccc9f08ad
parent95b876e0b6ea7b74a08bd6309745103195eb90ef (diff)
Trivial simplification of code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2325 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/Type.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp
index d537e70883..7a17d06ff6 100644
--- a/lib/VMCore/Type.cpp
+++ b/lib/VMCore/Type.cpp
@@ -103,8 +103,7 @@ bool Type::isLosslesslyConvertableTo(const Type *Ty) const {
case Type::ULongTyID:
case Type::LongTyID:
case Type::PointerTyID:
- return Ty == Type::ULongTy || Ty == Type::LongTy ||
- Ty->getPrimitiveID() == Type::PointerTyID;
+ return Ty == Type::ULongTy || Ty == Type::LongTy || isa<PointerType>(Ty);
default:
return false; // Other types have no identity values
}