summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-02 23:59:12 +0000
committerChris Lattner <sabre@nondot.org>2006-03-02 23:59:12 +0000
commit259d680c15a545e418f10591d38fc54ea9650d88 (patch)
tree811f79dd93a7379a8450efa989cbfcd0499382df /llvm/lib
parentd124535de17243a1d496bbdb4ee52864f69e6e10 (diff)
downloadbcm5719-llvm-259d680c15a545e418f10591d38fc54ea9650d88.tar.gz
bcm5719-llvm-259d680c15a545e418f10591d38fc54ea9650d88.zip
Simplify the autoupgrade interface
llvm-svn: 26475
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Bytecode/Reader/Reader.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/Bytecode/Reader/Reader.cpp b/llvm/lib/Bytecode/Reader/Reader.cpp
index f9ac0bab1b9..501bd62d6e1 100644
--- a/llvm/lib/Bytecode/Reader/Reader.cpp
+++ b/llvm/lib/Bytecode/Reader/Reader.cpp
@@ -1865,11 +1865,8 @@ void BytecodeReader::ParseFunctionBody(Function* F) {
if (CallInst* CI = dyn_cast<CallInst>(II)) {
std::map<Function*,Function*>::iterator FI =
upgradedFunctions.find(CI->getCalledFunction());
- if (FI != upgradedFunctions.end()) {
- Instruction* newI = UpgradeIntrinsicCall(CI,FI->second);
- CI->replaceAllUsesWith(newI);
- CI->eraseFromParent();
- }
+ if (FI != upgradedFunctions.end())
+ UpgradeIntrinsicCall(CI, FI->second);
}
}
@@ -2444,7 +2441,7 @@ void BytecodeReader::ParseBytecode(BufPtr Buf, unsigned Length,
for (Module::iterator FI = TheModule->begin(), FE = TheModule->end();
FI != FE; ++FI)
if (Function* newF = UpgradeIntrinsicFunction(FI)) {
- upgradedFunctions.insert(std::make_pair(FI,newF));
+ upgradedFunctions.insert(std::make_pair(FI, newF));
FI->setName("");
}
OpenPOWER on IntegriCloud