summaryrefslogtreecommitdiffstats
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
commitf0974de75e5730a969e085835584c71650ecb539 (patch)
tree4b9bd517359dab6712e8f6af1d91d2b0831052b1
parent8089763f480427bfca716d0ff64ed761b425a0df (diff)
downloadbcm5719-llvm-f0974de75e5730a969e085835584c71650ecb539.tar.gz
bcm5719-llvm-f0974de75e5730a969e085835584c71650ecb539.zip
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. llvm-svn: 72029
-rw-r--r--llvm/lib/VMCore/Instructions.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp
index 0dd69a18bc9..fe30271f844 100644
--- a/llvm/lib/VMCore/Instructions.cpp
+++ b/llvm/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");
OpenPOWER on IntegriCloud