mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-04 22:07:27 +00:00
vector casts never reinterpret bits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27354 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a1c3538537
commit
a3124a3d1e
@ -75,6 +75,11 @@ const Type *Type::getPrimitiveType(TypeID IDNumber) {
|
||||
//
|
||||
bool Type::isLosslesslyConvertibleTo(const Type *Ty) const {
|
||||
if (this == Ty) return true;
|
||||
|
||||
// Packed type conversions are always bitwise.
|
||||
if (isa<PackedType>(this) && isa<PackedType>(Ty))
|
||||
return true;
|
||||
|
||||
if ((!isPrimitiveType() && !isa<PointerType>(this)) ||
|
||||
(!isa<PointerType>(Ty) && !Ty->isPrimitiveType())) return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user