Closed
Description
Bugzilla Link | 9639 |
Resolution | FIXED |
Resolved on | Apr 09, 2011 00:51 |
Version | 2.8 |
OS | Windows XP |
Reporter | LLVM Bugzilla Contributor |
CC | @efriedma-quic |
Extended Description
AliasSetTracker.h
void removeCallSite(CallSite CS) {
for (size_t i = 0, e = CallSites.size(); i != e; ++i)
if (CallSites[i] == CS.getInstruction()) {
CallSites[i] = CallSites.back();
CallSites.pop_back();
}
}
this code is wrong, it caches the size of the vector but it doesn't update the size after removing an element from the vector
this piece of code fixes it
void removeCallSite(CallSite CS) {
for (size_t i = 0; i != CallSites.size(); ++i)
if (CallSites[i] == CS.getInstruction()) {
CallSites[i] = CallSites.back();
CallSites.pop_back();
}
}
Thanks,
Miguel