and pointer types safely if they only do so when the sizes are the same.
llvm-gcc is such a client.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72029
91177308-0d34-0410-b5e6-
96231b3b80d8
} else {
assert(isa<PointerType>(SrcTy) &&
"Casting from a value that is not first-class type");
- assert(!SrcIsSigned &&
- "Pointer types cannot be considered signed for conversions!");
return PtrToInt; // ptr -> int
}
} else if (DestTy->isFloatingPoint()) { // Casting to floating pt
if (isa<PointerType>(SrcTy)) {
return BitCast; // ptr -> ptr
} else if (SrcTy->isInteger()) {
- assert(!SrcIsSigned && "Cannot cast signed integer to pointer!");
return IntToPtr; // int -> ptr
} else {
assert(!"Casting pointer to other than pointer or int");