Use a stronger predicate here, pointed out by Duncan

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121040 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2010-12-06 21:48:10 +00:00
parent a9d4da85d6
commit 29d8d6b039

View File

@ -277,7 +277,7 @@ static bool isObjectPointerWithTrustworthySize(const Value *V) {
if (const AllocaInst *AI = dyn_cast<AllocaInst>(V))
return !AI->isArrayAllocation();
if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(V))
return !GV->isWeakForLinker();
return !GV->mayBeOverridden();
if (const Argument *A = dyn_cast<Argument>(V))
return A->hasByValAttr();
return false;