mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
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
This commit is contained in:
parent
f17a09d878
commit
7026107b70
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user