projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f41fcbb
)
fix a serious regression I introduced in my previous patch.
author
Chris Lattner
<sabre@nondot.org>
Wed, 1 Apr 2009 01:43:03 +0000
(
01:43
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Wed, 1 Apr 2009 01:43:03 +0000
(
01:43
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68173
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Bitcode/Reader/BitcodeReader.cpp
patch
|
blob
|
history
diff --git
a/lib/Bitcode/Reader/BitcodeReader.cpp
b/lib/Bitcode/Reader/BitcodeReader.cpp
index dfa215c2ed7b15a6df162cefb51ff4d5db8f27ab..dd9db8f4366f479a15bd64b8b8a6bad365eb5cdd 100644
(file)
--- a/
lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/
lib/Bitcode/Reader/BitcodeReader.cpp
@@
-2067,7
+2067,8
@@
Module *BitcodeReader::materializeModule(std::string *ErrInfo) {
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();
}
}