dereferencable, noticed by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124085
91177308-0d34-0410-b5e6-
96231b3b80d8
if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(this))
return !GV->hasExternalWeakLinkage();
+ // byval arguments are ok.
+ if (const Argument *A = dyn_cast<Argument>(this))
+ return A->hasByValAttr();
+
// For GEPs, determine if the indexing lands within the allocated object.
if (const GEPOperator *GEP = dyn_cast<GEPOperator>(this)) {
// Conservatively require that the base pointer be fully dereferenceable.