Trivial simplification of code
authorChris Lattner <sabre@nondot.org>
Sat, 27 Apr 2002 02:26:03 +0000 (02:26 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 27 Apr 2002 02:26:03 +0000 (02:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2325 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Type.cpp

index d537e708838b9fdbd58f84ea895788ab49a19e18..7a17d06ff6a1d246665471b2fb94d4e8d87d5506 100644 (file)
@@ -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
   }