diff options
| author | Chris Lattner <sabre@nondot.org> | 2001-12-06 18:06:37 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2001-12-06 18:06:37 +0000 |
| commit | 7af2be143d53285bc3530be7701955737e0f7914 (patch) | |
| tree | 5405c1ee9d0d3a8f98f59d034e712ff5f2e9c774 /llvm/lib | |
| parent | 71ffba7b70a5dd9acbcea981029793061121f746 (diff) | |
| download | bcm5719-llvm-7af2be143d53285bc3530be7701955737e0f7914.tar.gz bcm5719-llvm-7af2be143d53285bc3530be7701955737e0f7914.zip | |
Do not pessimize users of this function. Fix logic.
llvm-svn: 1428
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/VMCore/Type.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/Type.cpp b/llvm/lib/VMCore/Type.cpp index e0af0cbc45b..b13bb602f7c 100644 --- a/llvm/lib/VMCore/Type.cpp +++ b/llvm/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 |

