aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Reader
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
commitbad08000f11f9aed65e0e18b8ccf827d16401a42 (patch)
treea09709110cf6d477fdddd1b3f57d3e106a5c30c9 /lib/Bytecode/Reader
parentffa987d3eeb04b69f356799e544a9bb7b0095541 (diff)
Simplify the autoupgrade interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26475 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Reader')
-rw-r--r--lib/Bytecode/Reader/Reader.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp
index f9ac0bab1b..501bd62d6e 100644
--- a/lib/Bytecode/Reader/Reader.cpp
+++ b/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("");
}