mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
getParent()->getParent() == getFunction() and clang-format ; NFC
llvm-svn: 257399
This commit is contained in:
parent
3bc0384514
commit
61d0be65b2
@ -2099,21 +2099,17 @@ static Constant *computePointerICmp(const DataLayout &DL,
|
||||
// that might be resolve lazily to symbols in another dynamically-loaded
|
||||
// library (and, thus, could be malloc'ed by the implementation).
|
||||
auto IsAllocDisjoint = [](SmallVectorImpl<Value *> &Objects) {
|
||||
return std::all_of(Objects.begin(), Objects.end(),
|
||||
[](Value *V){
|
||||
if (const AllocaInst *AI = dyn_cast<AllocaInst>(V))
|
||||
return AI->getParent() && AI->getParent()->getParent() &&
|
||||
AI->isStaticAlloca();
|
||||
if (const GlobalValue *GV = dyn_cast<GlobalValue>(V))
|
||||
return (GV->hasLocalLinkage() ||
|
||||
GV->hasHiddenVisibility() ||
|
||||
GV->hasProtectedVisibility() ||
|
||||
GV->hasUnnamedAddr()) &&
|
||||
!GV->isThreadLocal();
|
||||
if (const Argument *A = dyn_cast<Argument>(V))
|
||||
return A->hasByValAttr();
|
||||
return false;
|
||||
});
|
||||
return std::all_of(Objects.begin(), Objects.end(), [](Value *V) {
|
||||
if (const AllocaInst *AI = dyn_cast<AllocaInst>(V))
|
||||
return AI->getParent() && AI->getFunction() && AI->isStaticAlloca();
|
||||
if (const GlobalValue *GV = dyn_cast<GlobalValue>(V))
|
||||
return (GV->hasLocalLinkage() || GV->hasHiddenVisibility() ||
|
||||
GV->hasProtectedVisibility() || GV->hasUnnamedAddr()) &&
|
||||
!GV->isThreadLocal();
|
||||
if (const Argument *A = dyn_cast<Argument>(V))
|
||||
return A->hasByValAttr();
|
||||
return false;
|
||||
});
|
||||
};
|
||||
|
||||
if ((IsNAC(LHSUObjs) && IsAllocDisjoint(RHSUObjs)) ||
|
||||
|
Loading…
Reference in New Issue
Block a user