aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-12-06 18:06:37 +0000
committerChris Lattner <sabre@nondot.org>2001-12-06 18:06:37 +0000
commit7026107b70829c7f9ebe6ff88dc31feec02e9015 (patch)
tree2544713be4feb3fdd540d50e6325aced816b7cfc /lib/VMCore
parentf17a09d878f742dbdbbb22bd10b0081dfa3991ff (diff)
downloadexternal_llvm-7026107b70829c7f9ebe6ff88dc31feec02e9015.zip
external_llvm-7026107b70829c7f9ebe6ff88dc31feec02e9015.tar.gz
external_llvm-7026107b70829c7f9ebe6ff88dc31feec02e9015.tar.bz2
Do not pessimize users of this function. Fix logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1428 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/Type.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp
index e0af0cb..b13bb60 100644
--- a/lib/VMCore/Type.cpp
+++ b/lib/VMCore/Type.cpp
@@ -72,8 +72,8 @@ const Type *Type::getPrimitiveType(PrimitiveID IDNumber) {
//
bool Type::isLosslesslyConvertableTo(const Type *Ty) const {
if (this == Ty) return true;
- if ((!isPrimitiveType() && !Ty->isPointerType()) ||
- (!isPointerType() && !Ty->isPrimitiveType())) return false;
+ if ((!isPrimitiveType() && !isPointerType()) ||
+ (!Ty->isPointerType() && !Ty->isPrimitiveType())) return false;
if (getPrimitiveID() == Ty->getPrimitiveID())
return true; // Handles identity cast, and cast of differing pointer types