mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
Fix a bug found by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112081 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6b9cb84f8c
commit
56e2a57744
@ -2323,7 +2323,7 @@ bool BitcodeReader::ParseFunctionBody(Function *F) {
|
||||
if (A->getParent() == 0) {
|
||||
// We found at least one unresolved value. Nuke them all to avoid leaks.
|
||||
for (unsigned i = ModuleValueListSize, e = ValueList.size(); i != e; ++i){
|
||||
if ((A = dyn_cast<Argument>(ValueList.back())) && A->getParent() == 0) {
|
||||
if ((A = dyn_cast<Argument>(ValueList[i])) && A->getParent() == 0) {
|
||||
A->replaceAllUsesWith(UndefValue::get(A->getType()));
|
||||
delete A;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user