Skip to content
Snippets Groups Projects
Commit 4dc53e37 authored by Chris Lattner's avatar Chris Lattner
Browse files

Use a stronger predicate here, pointed out by Duncan

llvm-svn: 121040
parent 224af79e
No related branches found
No related tags found
No related merge requests found
...@@ -277,7 +277,7 @@ static bool isObjectPointerWithTrustworthySize(const Value *V) { ...@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment