http://llvm.org/bugs/show_bug.cgi?id=9639
Summary: Crash during llvm-ld
Product: new-bugs
Version: 2.8
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
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
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs