forked from OSchip/llvm-project
Fix crash bug on Windows.
Mutating the DenseMap here seems to cause the Windows executable to crash. Don't use operator[] to access possibly nonexistent key. llvm-svn: 218548
This commit is contained in:
parent
abce3c4e18
commit
b774a0e750
|
@ -305,8 +305,10 @@ void Resolver::markLive(const Atom *atom) {
|
|||
if (const DefinedAtom *defAtom = dyn_cast<DefinedAtom>(atom)) {
|
||||
for (const Reference *ref : *defAtom)
|
||||
markLive(ref->target());
|
||||
for (const Atom *target : _reverseRef[defAtom])
|
||||
markLive(target);
|
||||
auto it = _reverseRef.find(defAtom);
|
||||
if (it != _reverseRef.end())
|
||||
for (const Atom *target : it->second)
|
||||
markLive(target);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue