commit | da486cefd9a9924f052b5704103892d573e7690d | [log] [tgz] |
---|---|---|
author | Chris Lattner <sabre@nondot.org> | Wed Apr 01 01:43:03 2009 +0000 |
committer | Chris Lattner <sabre@nondot.org> | Wed Apr 01 01:43:03 2009 +0000 |
tree | 678f6fdbb843291712f45ebdd61b9e4b164b30a8 | |
parent | 9a017548c2d92cec58d9a9f076bf6fcb08e1be8a [diff] [blame] |
fix a serious regression I introduced in my previous patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68173 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index dfa215c..dd9db8f 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -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(); } }