[llvm] r262452 - Attempt to fix ASAN failure in a MemorySSA test.
George Burgess IV via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 1 18:35:04 PST 2016
Author: gbiv
Date: Tue Mar 1 20:35:04 2016
New Revision: 262452
URL: http://llvm.org/viewvc/llvm-project?rev=262452&view=rev
Log:
Attempt to fix ASAN failure in a MemorySSA test.
Modified:
llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp
Modified: llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp?rev=262452&r1=262451&r2=262452&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/MemorySSA.cpp Tue Mar 1 20:35:04 2016
@@ -463,11 +463,11 @@ void MemorySSA::removeFromLookups(Memory
}
ValueToMemoryAccess.erase(MemoryInst);
- auto &Accesses = PerBlockAccesses.find(MA->getBlock())->second;
+ auto AccessIt = PerBlockAccesses.find(MA->getBlock());
+ std::unique_ptr<AccessListType> &Accesses = AccessIt->second;
Accesses->erase(MA);
- if (Accesses->empty()) {
- PerBlockAccesses.erase(MA->getBlock());
- }
+ if (Accesses->empty())
+ PerBlockAccesses.erase(AccessIt);
}
void MemorySSA::removeMemoryAccess(MemoryAccess *MA) {
More information about the llvm-commits
mailing list