projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
854b9d7
)
getEntryFor() may invalidate DenseMap iterator.
author
Devang Patel
<dpatel@apple.com>
Mon, 30 Mar 2009 18:34:47 +0000
(18:34 +0000)
committer
Devang Patel
<dpatel@apple.com>
Mon, 30 Mar 2009 18:34:47 +0000
(18:34 +0000)
Walking an invalidated iterator is not a good idea.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68047
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Analysis/AliasSetTracker.cpp
patch
|
blob
|
history
diff --git
a/lib/Analysis/AliasSetTracker.cpp
b/lib/Analysis/AliasSetTracker.cpp
index a386a494fca020240cd6be84b6955b6c635a957e..18c2b66505f636811c4338b0974bb3bb1b3464e6 100644
(file)
--- a/
lib/Analysis/AliasSetTracker.cpp
+++ b/
lib/Analysis/AliasSetTracker.cpp
@@
-520,6
+520,7
@@
void AliasSetTracker::copyValue(Value *From, Value *To) {
if (Entry.hasAliasSet()) return; // Already in the tracker!
// Add it to the alias set it aliases...
+ I = PointerMap.find(From);
AliasSet *AS = I->second->getAliasSet(*this);
AS->addPointer(*this, Entry, I->second->getSize(), true);
}