aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-05-18 18:55:39 +0000
committerDan Gohman <gohman@apple.com>2009-05-18 18:55:39 +0000
commit16899a205638b81be8537526e34ad35ce3472299 (patch)
tree3587cb6f9d8ac1e5c943082c979837ea7a8eb2f2 /lib
parentd4083e5a91cb0d951d11e7682b1d6b341f5d0c60 (diff)
Revert r72025. It is possible for clients to convert between signed types
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
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/Instructions.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index 0dd69a18bc..fe30271f84 100644
--- a/lib/VMCore/Instructions.cpp
+++ b/lib/VMCore/Instructions.cpp
@@ -2220,8 +2220,6 @@ CastInst::getCastOpcode(
} 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
@@ -2261,7 +2259,6 @@ CastInst::getCastOpcode(
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");