mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-15 20:51:35 +00:00
ScopInfo: Further simplify code
Acc==MA implies Acc->getAccessInstruction() == MA->getAccessInstruction(). Suggested as post-commit review for 254305 by Michael Kruse. llvm-svn: 254327
This commit is contained in:
parent
28a661ec80
commit
3a6ac9f9b5
@ -1468,8 +1468,7 @@ void ScopStmt::removeMemoryAccesses(MemoryAccessList &InvMAs) {
|
||||
// together with all scalar accesses that were caused by them.
|
||||
for (MemoryAccess *MA : InvMAs) {
|
||||
auto Predicate = [&](MemoryAccess *Acc) {
|
||||
return Acc == MA ||
|
||||
Acc->getAccessInstruction() == MA->getAccessInstruction();
|
||||
return Acc->getAccessInstruction() == MA->getAccessInstruction();
|
||||
};
|
||||
MemAccs.erase(std::remove_if(MemAccs.begin(), MemAccs.end(), Predicate),
|
||||
MemAccs.end());
|
||||
|
Loading…
x
Reference in New Issue
Block a user