mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-12 15:30:56 +00:00
Avoid calling alias on non-pointer values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118822 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c7139a6f0d
commit
f3b8c76599
@ -231,10 +231,11 @@ void Lint::visitCallSite(CallSite CS) {
|
||||
// to do. Known partial overlap is not distinguished from the case
|
||||
// where nothing is known.
|
||||
if (Formal->hasNoAliasAttr() && Actual->getType()->isPointerTy())
|
||||
for (CallSite::arg_iterator BI = CS.arg_begin(); BI != AE; ++BI) {
|
||||
Assert1(AI == BI || AA->alias(*AI, *BI) != AliasAnalysis::MustAlias,
|
||||
for (CallSite::arg_iterator BI = CS.arg_begin(); BI != AE; ++BI)
|
||||
Assert1(AI == BI ||
|
||||
!(*BI)->getType()->isPointerTy() ||
|
||||
AA->alias(*AI, *BI) != AliasAnalysis::MustAlias,
|
||||
"Unusual: noalias argument aliases another argument", &I);
|
||||
}
|
||||
|
||||
// Check that an sret argument points to valid memory.
|
||||
if (Formal->hasStructRetAttr() && Actual->getType()->isPointerTy()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user