diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-04-01 01:43:03 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-04-01 01:43:03 +0000 | 
| commit | 647cffba610114b780059236b57aa78a3469197d (patch) | |
| tree | 11dc99fe59b9600dd918870cd840d6e9895a1861 /llvm/lib | |
| parent | ff5961b46c733dba039331d507414b786a31c9b8 (diff) | |
| download | bcm5719-llvm-647cffba610114b780059236b57aa78a3469197d.tar.gz bcm5719-llvm-647cffba610114b780059236b57aa78a3469197d.zip  | |
fix a serious regression I introduced in my previous patch.
llvm-svn: 68173
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index dfa215c2ed7..dd9db8f4366 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/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();      }    }  | 

