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

Chris Lattner sabre at nondot.org
Tue Mar 31 18:43:05 PDT 2009


Author: lattner
Date: Tue Mar 31 20:43:03 2009
New Revision: 68173

URL: http://llvm.org/viewvc/llvm-project?rev=68173&view=rev
Log:
fix a serious regression I introduced in my previous patch.

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=68173&r1=68172&r2=68173&view=diff

==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Tue Mar 31 20:43:03 2009
@@ -2067,7 +2067,8 @@
         if (CallInst* CI = dyn_cast<CallInst>(*UI++))
           UpgradeIntrinsicCall(CI, I->second);
       }
-      I->first->replaceAllUsesWith(I->second);
+      if (!I->first->use_empty())
+        I->first->replaceAllUsesWith(I->second);
       I->first->eraseFromParent();
     }
   }





More information about the llvm-commits mailing list