Use a stronger predicate here, pointed out by Duncan

llvm-svn: 121040
This commit is contained in:
Chris Lattner 2010-12-06 21:48:10 +00:00
parent 224af79e80
commit 4dc53e37d9
1 changed files with 1 additions and 1 deletions

View File

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