diff options
author | Dan Gohman <gohman@apple.com> | 2010-08-25 20:20:21 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-08-25 20:20:21 +0000 |
commit | 56e2a5774423047cd9b1a76e1e7b233567780ca6 (patch) | |
tree | fd4f601725fb8c84420ef755a3a709c3aa002ab3 /lib/Bitcode | |
parent | 6b9cb84f8c3c35d7d753aba1143371dc0d0a9ee3 (diff) |
Fix a bug found by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode')
-rw-r--r-- | lib/Bitcode/Reader/BitcodeReader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index 96b7f4d22d..63c85974e4 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/lib/Bitcode/Reader/BitcodeReader.cpp @@ -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; } |