[llvm-commits] [llvm] r112081 - /llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp

Dan Gohman gohman at apple.com
Wed Aug 25 13:20:21 PDT 2010


Author: djg
Date: Wed Aug 25 15:20:21 2010
New Revision: 112081

URL: http://llvm.org/viewvc/llvm-project?rev=112081&view=rev
Log:
Fix a bug found by inspection.

Modified:
    llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp

Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=112081&r1=112080&r2=112081&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Wed Aug 25 15:20:21 2010
@@ -2323,7 +2323,7 @@
     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;
         }





More information about the llvm-commits mailing list