bitcasts of pointers are always pointers.

If we see a memcpy of a pointer, make sure to check later
uses of the pointer as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47250 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2008-02-18 02:11:28 +00:00
parent 823391ae6e
commit 0ab5a4ae55

View File

@ -219,8 +219,6 @@ static bool AddressMightEscape(const Value *V) {
return true;
break; // next use.
case Instruction::BitCast:
if (!isa<PointerType>(I->getType()))
return true;
if (AddressMightEscape(I))
return true;
break; // next use
@ -231,10 +229,9 @@ static bool AddressMightEscape(const Value *V) {
case Instruction::Call:
// If the call is to a few known safe intrinsics, we know that it does
// not escape
if (isa<MemIntrinsic>(I))
return false;
else
if (!isa<MemIntrinsic>(I))
return true;
break; // next use
default:
return true;
}