diff options
author | Chris Lattner <sabre@nondot.org> | 2007-02-11 01:37:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-02-11 01:37:51 +0000 |
commit | 86cc42355593dd1689f7d58d56695c451215b02b (patch) | |
tree | bc83bae05962525946b96dbb4fd11f3957cedf11 /lib/Transforms/Utils/LowerInvoke.cpp | |
parent | 6934a04a8c15e9971cd1ea4d5c8df2d7afdd5be5 (diff) |
simplify code by using Value::takeName
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34177 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LowerInvoke.cpp')
-rw-r--r-- | lib/Transforms/Utils/LowerInvoke.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp index 62eec75160..0da30e2428 100644 --- a/lib/Transforms/Utils/LowerInvoke.cpp +++ b/lib/Transforms/Utils/LowerInvoke.cpp @@ -201,10 +201,10 @@ bool LowerInvoke::insertCheapEHSupport(Function &F) { for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) if (InvokeInst *II = dyn_cast<InvokeInst>(BB->getTerminator())) { // Insert a normal call instruction... - std::string Name = II->getName(); II->setName(""); CallInst *NewCall = new CallInst(II->getCalledValue(), std::vector<Value*>(II->op_begin()+3, - II->op_end()), Name, II); + II->op_end()), "", II); + NewCall->takeName(II); NewCall->setCallingConv(II->getCallingConv()); II->replaceAllUsesWith(NewCall); @@ -258,11 +258,11 @@ void LowerInvoke::rewriteExpensiveInvoke(InvokeInst *II, unsigned InvokeNo, CatchSwitch->addCase(InvokeNoC, II->getUnwindDest()); // Insert a normal call instruction. - std::string Name = II->getName(); II->setName(""); CallInst *NewCall = new CallInst(II->getCalledValue(), std::vector<Value*>(II->op_begin()+3, - II->op_end()), Name, + II->op_end()), "", II); + NewCall->takeName(II); NewCall->setCallingConv(II->getCallingConv()); II->replaceAllUsesWith(NewCall); |